chore: address Rust 1.83.0 clippy lints and enable more clippy lints (#6705)

This commit is contained in:
Sanchith Hegde
2024-12-02 20:00:44 +05:30
committed by GitHub
parent 797a0db773
commit 9a59d0a5ff
139 changed files with 147 additions and 417 deletions

View File

@ -87,7 +87,7 @@ pub fn analyze_exhaustive_negations(
.cloned()
.unwrap_or_default()
.iter()
.cloned()
.copied()
.cloned()
.collect(),
};
@ -121,12 +121,12 @@ fn analyze_negated_assertions(
value: (*val).clone(),
assertion_metadata: assertion_metadata
.get(*val)
.cloned()
.copied()
.cloned()
.unwrap_or_default(),
negation_metadata: negation_metadata
.get(*val)
.cloned()
.copied()
.cloned()
.unwrap_or_default(),
};

View File

@ -421,7 +421,7 @@ impl CgraphExt for cgraph::ConstraintGraph<dir::DirValue> {
for (key, negation_set) in keywise_negation {
let all_metadata = keywise_metadata.remove(&key).unwrap_or_default();
let first_metadata = all_metadata.first().cloned().cloned().unwrap_or_default();
let first_metadata = all_metadata.first().copied().cloned().unwrap_or_default();
self.key_analysis(key.clone(), analysis_ctx, memo, cycle_map, domains)
.map_err(|e| AnalysisError::assertion_from_graph_error(&first_metadata, e))?;

View File

@ -18,7 +18,7 @@ pub enum CtxValueKind<'a> {
Negation(&'a [dir::DirValue]),
}
impl<'a> CtxValueKind<'a> {
impl CtxValueKind<'_> {
pub fn get_assertion(&self) -> Option<&dir::DirValue> {
if let Self::Assertion(val) = self {
Some(val)