Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed Apr 27, 2023
1 parent b1078ad commit 17e1499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/expression/flat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,12 @@ mod detail {
}
})
.count();
let var = if n_vars_with_idx > 1 {
if n_vars_with_idx > 1 {
var_indices[found_idx_idx] = usize::MAX;
vars[*idx].clone()
} else {
mem::take(&mut vars[*idx])
};
var
}
}
})
})
Expand Down
5 changes: 4 additions & 1 deletion tests/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,5 +943,8 @@ fn test_eval_vec_iter() {
let x = StringContainer::new("alpha");
let y = StringContainer::new("beta");
let res = expr.eval_vec(vec![x, y]).unwrap();
assert_eq!(res, StringContainer::from_slice(&["alpha", "beta", "2", "alpha", "beta", "2"]).clone());
assert_eq!(
res,
StringContainer::from_slice(&["alpha", "beta", "2", "alpha", "beta", "2"]).clone()
);
}

0 comments on commit 17e1499

Please sign in to comment.