aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Hulthe <[email protected]>2023-01-23 13:35:24 +0100
committerJoakim Hulthe <[email protected]>2023-01-23 13:35:24 +0100
commit64e610fef708b7078e9690049583e05e16c6a3bd (patch)
tree295cc2de768800f4252551c4d54b5c7589a8fb98
parentf98ba4ebac192e81c46933c0dc1dfb2d907cd532 (diff)
Replace `Level: Into<bool>` with `From<Level>`
This automatically implements Into<bool> for Level
-rw-r--r--embassy-nrf/src/gpio.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs
index b7230302a..6ef5033eb 100644
--- a/embassy-nrf/src/gpio.rs
+++ b/embassy-nrf/src/gpio.rs
@@ -88,9 +88,9 @@ impl From<bool> for Level {
88 } 88 }
89} 89}
90 90
91impl Into<bool> for Level { 91impl From<Level> for bool {
92 fn into(self) -> bool { 92 fn from(level: Level) -> bool {
93 match self { 93 match level {
94 Level::Low => false, 94 Level::Low => false,
95 Level::High => true, 95 Level::High => true,
96 } 96 }