Remove unused use's

This commit is contained in:
Rasmus Melchior Jacobsen 2023-05-30 14:13:53 +02:00
parent b703db4c09
commit c22d2b5b5b
2 changed files with 10 additions and 10 deletions

View file

@ -1,5 +1,7 @@
use digest::Digest; use digest::Digest;
#[cfg(target_os = "none")]
use embassy_embedded_hal::flash::partition::Partition; use embassy_embedded_hal::flash::partition::Partition;
#[cfg(target_os = "none")]
use embassy_sync::blocking_mutex::raw::NoopRawMutex; use embassy_sync::blocking_mutex::raw::NoopRawMutex;
use embedded_storage_async::nor_flash::NorFlash; use embedded_storage_async::nor_flash::NorFlash;
@ -13,14 +15,12 @@ pub struct FirmwareUpdater<DFU: NorFlash, STATE: NorFlash> {
state: STATE, state: STATE,
} }
#[cfg(target_os = "none")]
impl<'a, FLASH: NorFlash> impl<'a, FLASH: NorFlash>
FirmwareUpdaterConfig<Partition<'a, NoopRawMutex, FLASH>, Partition<'a, NoopRawMutex, FLASH>> FirmwareUpdaterConfig<Partition<'a, NoopRawMutex, FLASH>, Partition<'a, NoopRawMutex, FLASH>>
{ {
/// Create a firmware updater config from the flash and address symbols defined in the linkerfile /// Create a firmware updater config from the flash and address symbols defined in the linkerfile
#[cfg(target_os = "none")] pub fn from_linkerfile(flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, FLASH>) -> Self {
pub fn from_linkerfile(flash: &'a Mutex<NoopRawMutex, FLASH>) -> Self {
use embassy_sync::mutex::Mutex;
extern "C" { extern "C" {
static __bootloader_state_start: u32; static __bootloader_state_start: u32;
static __bootloader_state_end: u32; static __bootloader_state_end: u32;

View file

@ -1,5 +1,7 @@
use digest::Digest; use digest::Digest;
#[cfg(target_os = "none")]
use embassy_embedded_hal::flash::partition::BlockingPartition; use embassy_embedded_hal::flash::partition::BlockingPartition;
#[cfg(target_os = "none")]
use embassy_sync::blocking_mutex::raw::NoopRawMutex; use embassy_sync::blocking_mutex::raw::NoopRawMutex;
use embedded_storage::nor_flash::NorFlash; use embedded_storage::nor_flash::NorFlash;
@ -13,16 +15,14 @@ pub struct BlockingFirmwareUpdater<DFU: NorFlash, STATE: NorFlash> {
state: STATE, state: STATE,
} }
#[cfg(target_os = "none")]
impl<'a, FLASH: NorFlash> impl<'a, FLASH: NorFlash>
FirmwareUpdaterConfig<BlockingPartition<'a, NoopRawMutex, FLASH>, BlockingPartition<'a, NoopRawMutex, FLASH>> FirmwareUpdaterConfig<BlockingPartition<'a, NoopRawMutex, FLASH>, BlockingPartition<'a, NoopRawMutex, FLASH>>
{ {
/// Create a firmware updater config from the flash and address symbols defined in the linkerfile /// Create a firmware updater config from the flash and address symbols defined in the linkerfile
#[cfg(target_os = "none")] pub fn from_linkerfile_blocking(
pub fn from_linkerfile_blocking(flash: &'a Mutex<NoopRawMutex, RefCell<FLASH>>) -> Self { flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<FLASH>>,
use core::cell::RefCell; ) -> Self {
use embassy_sync::blocking_mutex::Mutex;
extern "C" { extern "C" {
static __bootloader_state_start: u32; static __bootloader_state_start: u32;
static __bootloader_state_end: u32; static __bootloader_state_end: u32;