Skip to content

Commit 19844a0

Browse files
committed
Simplify option use
1 parent 611b376 commit 19844a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

num_enum_derive/src/parsing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl EnumInfo {
3232
return Ok(false);
3333
} else if let Ok(bits) = suffix.parse::<u32>() {
3434
let variants = 1usize.checked_shl(bits);
35-
return Ok(variants.map_or(false, |v| {
35+
return Ok(variants.is_some_and(|v| {
3636
v == self
3737
.variants
3838
.iter()

0 commit comments

Comments
 (0)