1171: Implement From<gpio::Level> for bool r=Dirbaio a=hulthe

From implies Into, so this won't break anything.

Co-authored-by: Joakim Hulthe <joakim@hulthe.net>
This commit is contained in:
bors[bot] 2023-01-23 17:38:05 +00:00 committed by GitHub
commit 4dadfb41ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,
}