diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-01-23 17:38:05 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-01-23 17:38:05 +0000 |
| commit | 4dadfb41ea491f4e341d5439cb33316d4e51e246 (patch) | |
| tree | 295cc2de768800f4252551c4d54b5c7589a8fb98 | |
| parent | f98ba4ebac192e81c46933c0dc1dfb2d907cd532 (diff) | |
| parent | 64e610fef708b7078e9690049583e05e16c6a3bd (diff) | |
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 <[email protected]>
| -rw-r--r-- | embassy-nrf/src/gpio.rs | 6 |
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 | ||
| 91 | impl Into<bool> for Level { | 91 | impl 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 | } |
