From 64e610fef708b7078e9690049583e05e16c6a3bd Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Mon, 23 Jan 2023 13:35:24 +0100 Subject: [PATCH] Replace `Level: Into` with `From` This automatically implements Into for Level --- embassy-nrf/src/gpio.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs index b7230302..6ef5033e 100644 --- a/embassy-nrf/src/gpio.rs +++ b/embassy-nrf/src/gpio.rs @@ -88,9 +88,9 @@ impl From for Level { } } -impl Into for Level { - fn into(self) -> bool { - match self { +impl From for bool { + fn from(level: Level) -> bool { + match level { Level::Low => false, Level::High => true, }