Skip to content

Commit

Permalink
linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkamprath committed Nov 29, 2024
1 parent b28491f commit 646e34c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ fn main() -> ! {
use core::mem::MaybeUninit;
const HEAP_SIZE: usize = 4048;
static mut HEAP_MEM: [MaybeUninit<u8>; HEAP_SIZE] = [MaybeUninit::uninit(); HEAP_SIZE];
unsafe { HEAP.init(HEAP_MEM.as_ptr() as usize, HEAP_SIZE) }
#[allow(static_mut_refs)]
unsafe {
HEAP.init(HEAP_MEM.as_ptr() as usize, HEAP_SIZE)
}
}

info!("Program start");
Expand Down
6 changes: 2 additions & 4 deletions src/robot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,6 @@ where

/// Implements the defmt::Format trait for the Robot struct, allowing the Robot object to be printed with defmt
impl<
'a,
INA1: OutputPin,
INA2: OutputPin,
INB1: OutputPin,
Expand All @@ -764,7 +763,7 @@ impl<
TWI1,
SPI_DEV: SpiDevice<u8>,
DELAY,
> Format for Robot<'a, INA1, INA2, INB1, INB2, ENA, ENB, BUTT1, BUTT2, TWI1, SPI_DEV, DELAY>
> Format for Robot<'_, INA1, INA2, INB1, INB2, ENA, ENB, BUTT1, BUTT2, TWI1, SPI_DEV, DELAY>
where
TWI1: I2c,
DELAY: DelayNs + Clone,
Expand All @@ -781,7 +780,6 @@ where

/// Implement the `core::fmt::Write` trait for the robot, allowing us to use the `core::write!` macro
impl<
'a,
INA1: OutputPin,
INA2: OutputPin,
INB1: OutputPin,
Expand All @@ -794,7 +792,7 @@ impl<
SPI_DEV: SpiDevice<u8>,
DELAY,
> core::fmt::Write
for Robot<'a, INA1, INA2, INB1, INB2, ENA, ENB, BUTT1, BUTT2, TWI1, SPI_DEV, DELAY>
for Robot<'_, INA1, INA2, INB1, INB2, ENA, ENB, BUTT1, BUTT2, TWI1, SPI_DEV, DELAY>
where
TWI1: I2c,
DELAY: DelayNs + Clone,
Expand Down
4 changes: 2 additions & 2 deletions src/system/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ where
}
}

impl<'a, T, const M: usize> Format for DataTable<'a, T, M>
impl<T, const M: usize> Format for DataTable<'_, T, M>
where
T: Copy + Default + Format,
{
Expand All @@ -173,7 +173,7 @@ where
}
}

impl<'a, T, const M: usize> core::fmt::Display for DataTable<'a, T, M>
impl<T, const M: usize> core::fmt::Display for DataTable<'_, T, M>
where
T: Copy + Default + Format + core::fmt::Display,
{
Expand Down

0 comments on commit 646e34c

Please sign in to comment.