Fix clippy::redundant_closure warning
This commit is contained in:
parent
b9ac443e56
commit
2341801cd0
|
@ -447,7 +447,7 @@ impl<'a> LocalExecutor<'a> {
|
|||
|
||||
/// Returns a reference to the inner executor.
|
||||
fn inner(&self) -> &Executor<'a> {
|
||||
self.inner.get_or_init(|| Executor::new())
|
||||
self.inner.get_or_init(Executor::new)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use once_cell::sync::Lazy;
|
|||
#[test]
|
||||
fn executor_cancels_everything() {
|
||||
static DROP: AtomicUsize = AtomicUsize::new(0);
|
||||
static WAKER: Lazy<Mutex<Option<Waker>>> = Lazy::new(|| Default::default());
|
||||
static WAKER: Lazy<Mutex<Option<Waker>>> = Lazy::new(Default::default);
|
||||
|
||||
let ex = Executor::new();
|
||||
|
||||
|
@ -41,7 +41,7 @@ fn executor_cancels_everything() {
|
|||
#[test]
|
||||
fn leaked_executor_leaks_everything() {
|
||||
static DROP: AtomicUsize = AtomicUsize::new(0);
|
||||
static WAKER: Lazy<Mutex<Option<Waker>>> = Lazy::new(|| Default::default());
|
||||
static WAKER: Lazy<Mutex<Option<Waker>>> = Lazy::new(Default::default);
|
||||
|
||||
let ex = Executor::new();
|
||||
|
||||
|
|
Loading…
Reference in New Issue