Skip to content

Commit

Permalink
Remove as casts
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Oct 31, 2023
1 parent cb837f1 commit 8c2f68a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cfg_expr/expr/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,9 @@ impl Expression {
let key = pred_key.take();
let val = pred_val.take();

// In this context, the boolean to int conversion is confusing.
#[allow(clippy::bool_to_int_with_if)]
let num_predicates = top.predicates.len()
+ if key.is_some() { 1 } else { 0 }
+ top.nest_level as usize;
+ usize::from(key.is_some())
+ usize::from(top.nest_level);

let func = match top.func {
Func::All(_) => Func::All(num_predicates),
Expand Down

0 comments on commit 8c2f68a

Please sign in to comment.