Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Vollbrecht committed Nov 24, 2023
1 parent 504159c commit 01fb9ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,12 @@ impl<'d, T: Pin, MODE> PinDriver<'d, T, MODE> {
gpio_reset_without_pull(pin.pin())?;
core::mem::forget(self);

if mode != gpio_mode_t_GPIO_MODE_DISABLE {
esp!(unsafe { gpio_set_direction(pin.pin(), mode) })?;
}

Ok(PinDriver {
pin: pin,
pin,
_mode: PhantomData,
})
}
Expand Down

0 comments on commit 01fb9ec

Please sign in to comment.