diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-06-05 02:48:22 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-05 02:48:22 +0200 |
| commit | f6d75970d8beddc08f0f233fdee9d51a5264bd67 (patch) | |
| tree | 96f502bfc4b100916b56955c63a1a0e072026b44 | |
| parent | f2c2536cf3d67e4e28616f631b6bdde789b15560 (diff) | |
| parent | a4b8fc420a377bd231d413dbdb2543550e3726ef (diff) | |
Merge pull request #1534 from ExplodingWaffle/main
Replace Into<bool> for Level with From<Level> for bool
| -rw-r--r-- | embassy-rp/src/gpio.rs | 6 | ||||
| -rw-r--r-- | embassy-stm32/src/gpio.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs index f213bfeab..91cef8609 100644 --- a/embassy-rp/src/gpio.rs +++ b/embassy-rp/src/gpio.rs | |||
| @@ -31,9 +31,9 @@ impl From<bool> for Level { | |||
| 31 | } | 31 | } |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | impl Into<bool> for Level { | 34 | impl From<Level> for bool { |
| 35 | fn into(self) -> bool { | 35 | fn from(level: Level) -> bool { |
| 36 | match self { | 36 | match level { |
| 37 | Level::Low => false, | 37 | Level::Low => false, |
| 38 | Level::High => true, | 38 | Level::High => true, |
| 39 | } | 39 | } |
diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs index 4895684e0..7a066a4ca 100644 --- a/embassy-stm32/src/gpio.rs +++ b/embassy-stm32/src/gpio.rs | |||
| @@ -341,9 +341,9 @@ impl From<bool> for Level { | |||
| 341 | } | 341 | } |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | impl Into<bool> for Level { | 344 | impl From<Level> for bool { |
| 345 | fn into(self) -> bool { | 345 | fn from(level: Level) -> bool { |
| 346 | match self { | 346 | match level { |
| 347 | Level::Low => false, | 347 | Level::Low => false, |
| 348 | Level::High => true, | 348 | Level::High => true, |
| 349 | } | 349 | } |
