Skip to content

Commit

Permalink
simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Oct 1, 2024
1 parent 313b2e8 commit deed3ef
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/core/jit/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,19 +413,14 @@ impl<Input> OperationPlan<Input> {

let dedupe = fields
.iter()
.filter_map(|field| {
.map(|field| {
if let Some(IR::IO(io)) = field.ir.as_ref() {
Some(io.dedupe())
io.dedupe()
} else {
None
true
}
})
.fold(None, |acc, dedupe| match acc {
None => Some(dedupe),
Some(prev_dedupe) if prev_dedupe != dedupe => Some(false),
_ => acc,
})
.unwrap_or_default();
.all(|a| a);

Self {
root_name: root_name.to_string(),
Expand Down

0 comments on commit deed3ef

Please sign in to comment.