Merge pull request #1534 from ExplodingWaffle/main

Replace Into<bool> for Level with From<Level> for bool
This commit is contained in:
Dario Nieuwenhuis 2023-06-05 02:48:22 +02:00 committed by GitHub
commit f6d75970d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {
fn into(self) -> bool {
match self {
impl From<Level> for bool {
fn from(level: Level) -> bool {
match level {
Level::Low => false,
Level::High => true,
}

View File

@ -341,9 +341,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,
}