Merge #1171
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:
commit
4dadfb41ea
@ -88,9 +88,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,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user