silence clippy warnings

cargo clippy --fix ftw
This commit is contained in:
Niko Matsakis 2021-10-30 17:20:32 -04:00
parent a53b1c53f1
commit cb00077ebc
4 changed files with 7 additions and 13 deletions

View file

@ -279,7 +279,7 @@ where
// consumers must be aware of. Becoming *more* durable
// is not. See the test `constant_to_non_constant`.
if result.durability >= old_memo.revisions.durability
&& MP::memoized_value_eq(&old_value, &result.value)
&& MP::memoized_value_eq(old_value, &result.value)
{
debug!(
"read_upgrade({:?}): value is equal, back-dating to {:?}",
@ -792,11 +792,8 @@ impl MemoRevisions {
&mut self,
db: &dyn Database,
revision_now: Revision,
active_query: &ActiveQueryGuard<'_>,
_active_query: &ActiveQueryGuard<'_>,
) -> bool {
// Noop that silences the unused parameter lint.
drop(active_query);
assert!(self.verified_at != revision_now);
let verified_at = self.verified_at;
@ -905,10 +902,7 @@ impl MemoInputs {
}
match self {
MemoInputs::Tracked { inputs } => DebugMemoInputs::Tracked {
inputs: &inputs,
db,
},
MemoInputs::Tracked { inputs } => DebugMemoInputs::Tracked { inputs, db },
MemoInputs::NoInputs => DebugMemoInputs::NoInputs,
MemoInputs::Untracked => DebugMemoInputs::Untracked,
}

View file

@ -334,7 +334,7 @@ impl Runtime {
runtime_id: self.id(),
kind: EventKind::WillBlockOn {
other_runtime_id: other_id,
database_key: database_key,
database_key,
},
});

View file

@ -181,7 +181,7 @@ impl DependencyGraph {
},
);
self.query_dependents
.entry(database_key.clone())
.entry(database_key)
.or_default()
.push(from_id);
}
@ -203,7 +203,7 @@ impl DependencyGraph {
let edge = self.edges.remove(&from_id).expect("no edge for dependent");
assert_eq!(to_id, edge.blocked_on_id);
self.wait_results
.insert(from_id, (edge.stack, wait_result.clone()));
.insert(from_id, (edge.stack, wait_result));
}
// Now that we have inserted the `wait_results`,

View file

@ -11,6 +11,6 @@ impl Log {
}
pub(crate) fn take(&self) -> Vec<String> {
std::mem::replace(&mut *self.data.borrow_mut(), vec![])
std::mem::take(&mut *self.data.borrow_mut())
}
}