Skip to content

Commit

Permalink
fix many lints
Browse files Browse the repository at this point in the history
  • Loading branch information
tguichaoua committed Jan 23, 2025
1 parent b0aa222 commit a6c7790
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
3 changes: 2 additions & 1 deletion packages/sycamore-futures/src/suspense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl SuspenseScope {
|| self
.parent
.as_ref()
.map_or(false, |parent| parent.get()._is_loading())
.is_some_and(|parent| parent.get()._is_loading())
}

/// Returns a signal representing whether we are currently loading this suspense or not.
Expand Down Expand Up @@ -153,6 +153,7 @@ pub fn create_detached_suspense_scope<T>(f: impl FnOnce() -> T) -> (T, SuspenseS
}

// TODO: remove this in the next major version
#[allow(missing_docs)]
#[deprecated = "Please use `create_detached_suspense_scope` instead"]
pub fn create_detatched_suspense_scope<T>(f: impl FnOnce() -> T) -> (T, SuspenseScope) {
create_detached_suspense_scope(f)
Expand Down
2 changes: 1 addition & 1 deletion packages/sycamore-macro/src/props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ mod field_info {
pub builder_attr: FieldBuilderAttr,
}

impl<'a> FieldInfo<'a> {
impl FieldInfo<'_> {
pub fn new(
ordinal: usize,
field: &syn::Field,
Expand Down
1 change: 0 additions & 1 deletion packages/sycamore-router/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pub trait Integration {
fn on_popstate(&self, f: Box<dyn FnMut()>);

/// Get the click handler that is run when links are clicked.
fn click_handler(&self) -> Box<dyn Fn(web_sys::MouseEvent)>;
}

Expand Down
4 changes: 1 addition & 3 deletions packages/sycamore-view-parser/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,7 @@ fn is_dyn_pattern(pat: &Pat) -> bool {
fn is_dyn_macro(m: &syn::Macro) -> bool {
// Bodies of nested inner view! macros will be checked for dynamic
// parts when their own codegen is run.
!m.path
.get_ident()
.is_some_and(|ident| "view" == &ident.to_string())
m.path.get_ident().is_none_or(|ident| ident != "view")
}

fn is_dyn_block(block: &syn::Block) -> bool {
Expand Down
6 changes: 3 additions & 3 deletions packages/sycamore-web/src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@ impl<'a> HashableNode<'a> {
}
}

impl<'a> PartialEq for HashableNode<'a> {
impl PartialEq for HashableNode<'_> {
fn eq(&self, other: &Self) -> bool {
self.1 == other.1
}
}

impl<'a> Eq for HashableNode<'a> {}
impl Eq for HashableNode<'_> {}

impl<'a> Hash for HashableNode<'a> {
impl Hash for HashableNode<'_> {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.1.hash(state);
}
Expand Down

0 comments on commit a6c7790

Please sign in to comment.