Skip to content

Commit

Permalink
Fix clippy::redundant_closure warning
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Oct 1, 2021
1 parent 26493b5 commit 939614b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions futures-test/src/lib.rs
Expand Up @@ -15,6 +15,7 @@
)
))]
#![allow(clippy::if_then_panic)]

#[cfg(not(feature = "std"))]
compile_error!(
"`futures-test` must have the `std` feature activated, this is a default-active feature"
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/future/future/shared.rs
Expand Up @@ -140,7 +140,7 @@ where
/// can change the strong count at any time, including potentially between calling this method
/// and acting on the result.
pub fn strong_count(&self) -> Option<usize> {
self.inner.as_ref().map(|arc| Arc::strong_count(arc))
self.inner.as_ref().map(Arc::strong_count)
}

/// Gets the number of weak pointers to this allocation.
Expand All @@ -153,7 +153,7 @@ where
/// can change the weak count at any time, including potentially between calling this method
/// and acting on the result.
pub fn weak_count(&self) -> Option<usize> {
self.inner.as_ref().map(|arc| Arc::weak_count(arc))
self.inner.as_ref().map(Arc::weak_count)
}
}

Expand Down

0 comments on commit 939614b

Please sign in to comment.