Skip to content

Commit e6bb420

Browse files
committed
Use then_some for constants
1 parent 2ed528b commit e6bb420

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

enum-iterator/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ impl Sequence for bool {
451451
const CARDINALITY: usize = 2;
452452

453453
fn next(&self) -> Option<Self> {
454-
(!*self).then(|| true)
454+
(!*self).then_some(true)
455455
}
456456

457457
fn previous(&self) -> Option<Self> {
458-
(*self).then(|| false)
458+
(*self).then_some(false)
459459
}
460460

461461
fn first() -> Option<Self> {

0 commit comments

Comments
 (0)