Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Oct 6, 2023
1 parent d5f331e commit 42f5a5d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/mir/src/analysis/reference_count/transformation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,22 @@ fn transform_expression(

let alternative_moved_variables = default_alternative_moved_variables
.iter()
.cloned()
.filter(|variable| {
.filter(|&variable| {
if let Some(alternative) = case.default_alternative() {
variable != alternative.name()
} else {
true
}
})
.cloned()
.chain(
alternative_tuples
.iter()
.flat_map(|(alternative, moved_variables)| {
moved_variables
.iter()
.filter(|&variable| variable != alternative.name())
.cloned()
.filter(|variable| variable != alternative.name())
.collect::<FnvHashSet<_>>()
}),
)
Expand Down Expand Up @@ -316,8 +316,8 @@ fn transform_expression(
&let_owned_variables,
&moved_variables
.iter()
.filter(|&variable| variable != let_.name())
.cloned()
.filter(|variable| variable != let_.name())
.collect(),
)?;
let (bound_expression, moved_variables) = transform_expression(
Expand All @@ -329,8 +329,8 @@ fn transform_expression(
.chain(
expression_moved_variables
.iter()
.cloned()
.filter(|variable| variable != let_.name()),
.filter(|&variable| variable != let_.name())
.cloned(),
)
.collect(),
)?;
Expand Down Expand Up @@ -368,8 +368,8 @@ fn transform_expression(
&let_owned_variables,
&moved_variables
.iter()
.filter(|&variable| variable != let_.definition().name())
.cloned()
.filter(|variable| variable != let_.definition().name())
.collect(),
)?;
let moved_variables = moved_variables
Expand All @@ -378,8 +378,8 @@ fn transform_expression(
.chain(
expression_moved_variables
.iter()
.cloned()
.filter(|variable| variable != let_.definition().name()),
.filter(|&variable| variable != let_.definition().name())
.cloned(),
)
.collect();
let cloned_variables = let_
Expand Down

0 comments on commit 42f5a5d

Please sign in to comment.