diff --git a/futures-test/src/lib.rs b/futures-test/src/lib.rs index 95528d5213..496252e720 100644 --- a/futures-test/src/lib.rs +++ b/futures-test/src/lib.rs @@ -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" diff --git a/futures-util/src/future/future/shared.rs b/futures-util/src/future/future/shared.rs index 9b31932fe3..d7ba49ec44 100644 --- a/futures-util/src/future/future/shared.rs +++ b/futures-util/src/future/future/shared.rs @@ -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 { - 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. @@ -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 { - self.inner.as_ref().map(|arc| Arc::weak_count(arc)) + self.inner.as_ref().map(Arc::weak_count) } }