diff --git a/src/derived/slot.rs b/src/derived/slot.rs index 70422663..c454d829 100644 --- a/src/derived/slot.rs +++ b/src/derived/slot.rs @@ -275,7 +275,7 @@ where } let new_value = StampedValue { - value: value, + value, durability: revisions.durability, changed_at: revisions.changed_at, }; @@ -294,7 +294,7 @@ where panic_guard.memo = Some(Memo { value: memo_value, verified_at: revision_now, - revisions: revisions, + revisions, }); panic_guard.proceed(); @@ -337,7 +337,7 @@ where // not to gate future atomic reads. anyone_waiting.store(true, Ordering::Relaxed); - return match self.block_on_in_progress_thread(db, runtime, other_id, state) { + match self.block_on_in_progress_thread(db, runtime, other_id, state) { Ok(WaitResult::Panicked) => Cancelled::PropagatedPanic.throw(), Ok(WaitResult::Completed) => ProbeState::Retry, Err(CycleDetected { @@ -353,7 +353,7 @@ where durability: cycle_error.durability, }, }), - }; + } } QueryState::Memoized(memo) => { diff --git a/src/lib.rs b/src/lib.rs index 7742b41b..6d55c99e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ #![allow(clippy::type_complexity)] +#![allow(clippy::question_mark)] #![warn(rust_2018_idioms)] #![warn(missing_docs)] diff --git a/tests/no_send_sync.rs b/tests/no_send_sync.rs index 4d4555ad..2648f2b7 100644 --- a/tests/no_send_sync.rs +++ b/tests/no_send_sync.rs @@ -29,5 +29,5 @@ fn no_send_sync() { let db = DatabaseImpl::default(); assert_eq!(db.no_send_sync_value(true), Rc::new(true)); - assert_eq!(db.no_send_sync_key(Rc::new(false)), false); + assert!(!db.no_send_sync_key(Rc::new(false))); }