Skip to content

Commit

Permalink
fix: clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chmanie committed Apr 1, 2024
1 parent 29f21bf commit d6e80da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub const REG_DAC_DATA: u8 = 0x60;
/// Available Ports
#[repr(u8)]
#[derive(Clone, Copy)]
pub(crate) enum Port {
pub enum Port {
/// Port 0
P0,
/// Port 1
Expand Down
10 changes: 7 additions & 3 deletions src/port.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use core::future::Future;
use embedded_hal::digital::OutputPin;
use embedded_hal_async::spi::SpiBus;
use seq_macro::seq;
Expand Down Expand Up @@ -25,10 +26,10 @@ where
}

pub trait IntoConfiguredPort<'a, CONFIG, SPI: 'a, EN: 'a, S, P> {
async fn into_configured_port(
fn into_configured_port(
self,
config: CONFIG,
) -> Result<MaxPort<'a, CONFIG, SPI, EN>, Error<S, P>>;
) -> impl Future<Output = Result<MaxPort<'a, CONFIG, SPI, EN>, Error<S, P>>>;
}

seq!(N in 0..=12 {
Expand Down Expand Up @@ -60,7 +61,10 @@ pub struct MaxPort<'a, CONFIG, SPI, EN> {
}

pub trait IntoMode<'a, CONFIG, SPI: 'a, EN: 'a, S, P> {
async fn into_mode(self, config: CONFIG) -> Result<MaxPort<'a, CONFIG, SPI, EN>, Error<S, P>>;
fn into_mode(
self,
config: CONFIG,
) -> impl Future<Output = Result<MaxPort<'a, CONFIG, SPI, EN>, Error<S, P>>>;
}

seq!(N in 0..=12 {
Expand Down

0 comments on commit d6e80da

Please sign in to comment.