Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fangpenlin committed Jan 7, 2025
1 parent cefa760 commit 7af2164
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub enum AuthMethod {
WAPIPersonal,
}

#[derive(Debug, Deserialize)]
#[derive(Deserialize)]
struct Wifi {
ssid: String,
auth_method: AuthMethod,
Expand All @@ -27,7 +27,7 @@ impl Debug for Wifi {
f.debug_struct("Wifi")
.field("ssid", &self.ssid)
.field("auth_method", &self.auth_method)
.field("password", "****")
.field("password", &"****")
.finish()
}
}
Expand All @@ -37,7 +37,7 @@ struct Api {
endpoint: String,
}

#[derive(Debug, Default, Deserialize)]
#[derive(Debug, Deserialize)]
struct Usb {
high_speed: bool,
}
Expand Down
10 changes: 10 additions & 0 deletions src/storage/spiflash.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use anyhow::{bail, Context};
use esp_idf_svc::handle::RawHandle;
use esp_idf_svc::partition::{EspPartition, EspWlPartition};
use esp_idf_svc::sys::wl_handle_t;

#[derive(Debug, Clone)]
pub struct SPIFlashConfig {
Expand Down Expand Up @@ -46,3 +48,11 @@ impl SPIFlashStorage {
Ok(())
}
}

impl RawHandle for SPIFlashStorage {
type Handle = wl_handle_t;

fn handle(&self) -> Self::Handle {
self.wl_partition.as_ref().unwrap().handle()
}
}

0 comments on commit 7af2164

Please sign in to comment.