mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
chore: address Rust 1.83.0 clippy lints and enable more clippy lints (#6705)
This commit is contained in:
@ -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(),
|
||||
};
|
||||
|
||||
@ -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))?;
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user