Skip to content

Commit 7af2164

Browse files
committed
Fix build errors
1 parent cefa760 commit 7af2164

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub enum AuthMethod {
1515
WAPIPersonal,
1616
}
1717

18-
#[derive(Debug, Deserialize)]
18+
#[derive(Deserialize)]
1919
struct Wifi {
2020
ssid: String,
2121
auth_method: AuthMethod,
@@ -27,7 +27,7 @@ impl Debug for Wifi {
2727
f.debug_struct("Wifi")
2828
.field("ssid", &self.ssid)
2929
.field("auth_method", &self.auth_method)
30-
.field("password", "****")
30+
.field("password", &"****")
3131
.finish()
3232
}
3333
}
@@ -37,7 +37,7 @@ struct Api {
3737
endpoint: String,
3838
}
3939

40-
#[derive(Debug, Default, Deserialize)]
40+
#[derive(Debug, Deserialize)]
4141
struct Usb {
4242
high_speed: bool,
4343
}

src/storage/spiflash.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use anyhow::{bail, Context};
2+
use esp_idf_svc::handle::RawHandle;
23
use esp_idf_svc::partition::{EspPartition, EspWlPartition};
4+
use esp_idf_svc::sys::wl_handle_t;
35

46
#[derive(Debug, Clone)]
57
pub struct SPIFlashConfig {
@@ -46,3 +48,11 @@ impl SPIFlashStorage {
4648
Ok(())
4749
}
4850
}
51+
52+
impl RawHandle for SPIFlashStorage {
53+
type Handle = wl_handle_t;
54+
55+
fn handle(&self) -> Self::Handle {
56+
self.wl_partition.as_ref().unwrap().handle()
57+
}
58+
}

0 commit comments

Comments
 (0)