mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
chore: clippy and fmt
This commit is contained in:
parent
efe832e39a
commit
634ac1c4a3
10 changed files with 10 additions and 27 deletions
|
@ -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;
|
||||
|
|
|
@ -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>,
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -357,7 +357,7 @@ where
|
|||
_buf: &mut String,
|
||||
_position: &mut Position,
|
||||
_escape: bool,
|
||||
mark_branches: bool,
|
||||
_mark_branches: bool,
|
||||
) {
|
||||
todo!()
|
||||
}
|
||||
|
|
|
@ -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("<!>")
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue