fix clippy warnings

This commit is contained in:
Niko Matsakis 2021-11-01 13:42:03 -04:00
parent 3f95c0b4a0
commit c096f714b5
3 changed files with 6 additions and 5 deletions

View file

@ -275,7 +275,7 @@ where
} }
let new_value = StampedValue { let new_value = StampedValue {
value: value, value,
durability: revisions.durability, durability: revisions.durability,
changed_at: revisions.changed_at, changed_at: revisions.changed_at,
}; };
@ -294,7 +294,7 @@ where
panic_guard.memo = Some(Memo { panic_guard.memo = Some(Memo {
value: memo_value, value: memo_value,
verified_at: revision_now, verified_at: revision_now,
revisions: revisions, revisions,
}); });
panic_guard.proceed(); panic_guard.proceed();
@ -337,7 +337,7 @@ where
// not to gate future atomic reads. // not to gate future atomic reads.
anyone_waiting.store(true, Ordering::Relaxed); 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::Panicked) => Cancelled::PropagatedPanic.throw(),
Ok(WaitResult::Completed) => ProbeState::Retry, Ok(WaitResult::Completed) => ProbeState::Retry,
Err(CycleDetected { Err(CycleDetected {
@ -353,7 +353,7 @@ where
durability: cycle_error.durability, durability: cycle_error.durability,
}, },
}), }),
}; }
} }
QueryState::Memoized(memo) => { QueryState::Memoized(memo) => {

View file

@ -1,4 +1,5 @@
#![allow(clippy::type_complexity)] #![allow(clippy::type_complexity)]
#![allow(clippy::question_mark)]
#![warn(rust_2018_idioms)] #![warn(rust_2018_idioms)]
#![warn(missing_docs)] #![warn(missing_docs)]

View file

@ -29,5 +29,5 @@ fn no_send_sync() {
let db = DatabaseImpl::default(); let db = DatabaseImpl::default();
assert_eq!(db.no_send_sync_value(true), Rc::new(true)); 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)));
} }