chore: clippy and fmt

This commit is contained in:
Greg Johnston 2024-07-23 17:17:26 -04:00
parent efe832e39a
commit 634ac1c4a3
10 changed files with 10 additions and 27 deletions

View file

@ -15,22 +15,6 @@ use proc_macro2::{Span, TokenTree};
use quote::{quote, ToTokens};
use syn::{parse_macro_input, spanned::Spanned, token::Pub, Visibility};
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub(crate) enum Mode {
Client,
Ssr,
}
impl Default for Mode {
fn default() -> Self {
if cfg!(feature = "hydrate") || cfg!(feature = "csr") {
Mode::Client
} else {
Mode::Ssr
}
}
}
mod params;
mod view;
use crate::component::unmodified_fn_name_from_fn_name;

View file

@ -121,7 +121,7 @@ where
S: ServerFn + 'static,
S::Output: 'static,
{
inner: Action<S, Result<S::Output, ServerFnError<S::Error>>, SyncStorage>,
inner: Action<S, Result<S::Output, ServerFnError<S::Error>>>,
#[cfg(debug_assertions)]
defined_at: &'static Location<'static>,
}

View file

@ -93,14 +93,13 @@ where
S: ServerFn + 'static,
S::Output: 'static,
{
inner:
MultiAction<S, Result<S::Output, ServerFnError<S::Error>>, SyncStorage>,
inner: MultiAction<S, Result<S::Output, ServerFnError<S::Error>>>,
#[cfg(debug_assertions)]
defined_at: &'static Location<'static>,
}
impl<S> From<ServerMultiAction<S>>
for MultiAction<S, Result<S::Output, ServerFnError<S::Error>>, SyncStorage>
for MultiAction<S, Result<S::Output, ServerFnError<S::Error>>>
where
S: ServerFn + 'static,
S::Output: 'static,

View file

@ -100,7 +100,7 @@ where
Arena::with(|arena| {
let m = arena.get(node);
m.and_then(|n| n.downcast_ref::<SendWrapper<T>>())
.map(|inner| fun(&inner))
.map(|inner| fun(inner))
})
}

View file

@ -67,7 +67,7 @@ where
buf: &mut String,
_position: &mut Position,
_escape: bool,
mark_branches: bool,
_mark_branches: bool,
) {
buf.push_str("<!DOCTYPE ");
buf.push_str(self.value);

View file

@ -357,7 +357,7 @@ where
_buf: &mut String,
_position: &mut Position,
_escape: bool,
mark_branches: bool,
_mark_branches: bool,
) {
todo!()
}

View file

@ -76,7 +76,7 @@ macro_rules! render_primitive {
self
}
fn to_html_with_buf(self, buf: &mut String, position: &mut Position, _escape: bool, mark_branches: bool) {
fn to_html_with_buf(self, buf: &mut String, position: &mut Position, _escape: bool, _mark_branches: bool) {
// add a comment node to separate from previous sibling, if any
if matches!(position, Position::NextChildAfterText) {
buf.push_str("<!>")

View file

@ -191,7 +191,7 @@ where
buf: &mut String,
position: &mut Position,
escape: bool,
mark_branches: bool,
_mark_branches: bool,
) {
// add a comment node to separate from previous sibling, if any
if matches!(position, Position::NextChildAfterText) {

View file

@ -59,7 +59,7 @@ where
buf: &mut String,
position: &mut Position,
escape: bool,
mark_branches: bool,
_mark_branches: bool,
) {
// add a comment node to separate from previous sibling, if any
if matches!(position, Position::NextChildAfterText) {

View file

@ -35,7 +35,7 @@ where
buf: &mut String,
position: &mut Position,
_escape: bool,
mark_branches: bool,
_mark_branches: bool,
) {
buf.push_str("<!>");
*position = Position::NextChild;