Replace Into<bool> for Level with From<Level> for bool

This commit is contained in:
ExplodingWaffle 2023-06-05 01:30:34 +01:00
parent f2c2536cf3
commit a4b8fc420a
2 changed files with 6 additions and 6 deletions

View File

@ -31,9 +31,9 @@ impl From<bool> for Level {
} }
} }
impl Into<bool> for Level { impl From<Level> for bool {
fn into(self) -> bool { fn from(level: Level) -> bool {
match self { match level {
Level::Low => false, Level::Low => false,
Level::High => true, Level::High => true,
} }

View File

@ -341,9 +341,9 @@ impl From<bool> for Level {
} }
} }
impl Into<bool> for Level { impl From<Level> for bool {
fn into(self) -> bool { fn from(level: Level) -> bool {
match self { match level {
Level::Low => false, Level::Low => false,
Level::High => true, Level::High => true,
} }