File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ impl Flasher {
253
253
debug ! ( "Loading flash stub for chip: {:?}" , self . chip) ;
254
254
255
255
// Load flash stub
256
- let stub = FlashStub :: get ( self . chip ) . unwrap ( ) ;
256
+ let stub = FlashStub :: get ( self . chip ) ;
257
257
258
258
let mut ram_target = self . chip . ram_target ( Some ( stub. entry ( ) ) ) ;
259
259
ram_target. begin ( & mut self . connection ) . flashing ( ) ?;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ const STUB_8266: &str = include_str!("../../../stubs/stub_flasher_8266.json");
28
28
29
29
impl FlashStub {
30
30
/// Fetch flash stub for the provided chip
31
- pub fn get ( chip : Chip ) -> Result < FlashStub , ( ) > {
31
+ pub fn get ( chip : Chip ) -> FlashStub {
32
32
let s = match chip {
33
33
Chip :: Esp32 => STUB_32 ,
34
34
Chip :: Esp32c2 => STUB_32C2 ,
@@ -38,9 +38,9 @@ impl FlashStub {
38
38
Chip :: Esp8266 => STUB_8266 ,
39
39
} ;
40
40
41
- let stub: FlashStub = serde_json:: from_str ( s) . map_err ( |_| ( ) ) ? ;
41
+ let stub: FlashStub = serde_json:: from_str ( s) . unwrap ( ) ;
42
42
43
- Ok ( stub)
43
+ stub
44
44
}
45
45
46
46
/// Fetch stub entry point
@@ -72,7 +72,7 @@ mod tests {
72
72
fn check_stub_encodings ( ) {
73
73
for c in Chip :: iter ( ) {
74
74
// Stub must be valid json
75
- let s = FlashStub :: get ( c) . unwrap ( ) ;
75
+ let s = FlashStub :: get ( c) ;
76
76
77
77
// Data decoded from b64
78
78
let _ = s. text ( ) ;
You can’t perform that action at this time.
0 commit comments