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

This automatically implements Into<bool> for Level
This commit is contained in:
Joakim Hulthe 2023-01-23 13:35:24 +01:00
parent f98ba4ebac
commit 64e610fef7
No known key found for this signature in database
GPG Key ID: 2C3E26A7FE602773

View File

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