Skip to content

Commit

Permalink
Avoid Option::is_none_or for a while
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Sep 2, 2024
1 parent 090a38c commit 42ed30f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ pub(crate) fn const_eval_discriminant_variant(
}

let repr = db.enum_data(loc.parent).repr;
let is_signed = repr.and_then(|repr| repr.int).is_none_or(|int| int.is_signed());
let is_signed = IsNoneOr::is_none_or(repr.and_then(|repr| repr.int), |int| int.is_signed());

let mir_body = db.monomorphized_mir_body(
def,
Expand Down

0 comments on commit 42ed30f

Please sign in to comment.