diff options
| author | ExplodingWaffle <[email protected]> | 2023-06-05 01:30:34 +0100 |
|---|---|---|
| committer | ExplodingWaffle <[email protected]> | 2023-06-05 01:37:56 +0100 |
| commit | a4b8fc420a377bd231d413dbdb2543550e3726ef (patch) | |
| tree | 96f502bfc4b100916b56955c63a1a0e072026b44 | |
| parent | f2c2536cf3d67e4e28616f631b6bdde789b15560 (diff) | |
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 | } |
