@@ -182,7 +182,7 @@ fn err_main() -> Result<(), CLIError> {
182182 let digest = md5:: compute ( & firmware) ;
183183 eprintln ! ( "MD5: {:x}" , digest) ;
184184
185- write_with_format ( output_file, & firmware, format) . map_err ( CLIError :: from ) ?;
185+ write_with_format ( output_file, & firmware, format) ?;
186186
187187 eprintln ! (
188188 "Successfully read {} bytes - {}" ,
@@ -207,7 +207,7 @@ fn err_main() -> Result<(), CLIError> {
207207
208208 let device_spec = get_device_spec_from_matches ( sub_matches) ;
209209
210- let mut firmware = read_with_format ( input_file, format) . map_err ( CLIError :: from ) ?;
210+ let mut firmware = read_with_format ( input_file, format) ?;
211211
212212 if firmware. len ( ) < device_spec. platform . firmware_size {
213213 eprintln ! (
@@ -286,8 +286,7 @@ fn err_main() -> Result<(), CLIError> {
286286
287287 let device_spec = get_device_spec_from_matches ( sub_matches) ;
288288
289- let mut firmware =
290- read_with_format ( input_file, input_format) . map_err ( CLIError :: from) ?;
289+ let mut firmware = read_with_format ( input_file, input_format) ?;
291290
292291 if firmware. len ( ) < device_spec. platform . firmware_size {
293292 log:: warn!(
@@ -322,7 +321,7 @@ fn err_main() -> Result<(), CLIError> {
322321 _ => unreachable ! ( ) ,
323322 }
324323
325- write_with_format ( output_file, & firmware, output_format) . map_err ( CLIError :: from ) ?;
324+ write_with_format ( output_file, & firmware, output_format) ?;
326325 }
327326 _ => unreachable ! ( ) ,
328327 }
0 commit comments