File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,10 @@ async fn main() -> Result<(), Error> {
73
73
. build ( )
74
74
. with_context ( || format ! ( "Failed to create HTTP client" ) ) ?;
75
75
let device_info = psa:: request_device_information ( & client, & vin) . await ?;
76
- let is_nac: bool = device_info. devices . map ( |l| l. iter ( ) . any ( |d| d. ecu_type . contains ( "NAC" ) ) ) == Some ( true ) ;
76
+ let is_nac: bool = device_info
77
+ . devices
78
+ . map ( |l| l. iter ( ) . any ( |d| d. ecu_type . contains ( "NAC" ) ) )
79
+ == Some ( true ) ;
77
80
78
81
// Maps not provided on command line, asking interactively for NAC
79
82
let map = if map. is_none ( ) && is_nac && interactive {
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ pub fn print(software: &Software, update: &SoftwareUpdate) {
222
222
223
223
pub async fn request_device_information (
224
224
client : & reqwest:: Client ,
225
- vin : & str
225
+ vin : & str ,
226
226
) -> Result < DeviceResponse , Error > {
227
227
let request = client
228
228
. get ( DEVICE_URL . replace ( "{VIN}" , vin) )
@@ -236,13 +236,13 @@ pub async fn request_device_information(
236
236
return Err ( anyhow ! (
237
237
"Failed to retrieve device information, make sure the VIN {} is correct." ,
238
238
vin
239
- ) )
239
+ ) ) ;
240
240
}
241
241
if response. status ( ) == 404 {
242
242
return Err ( anyhow ! (
243
243
"Device not found, make sure the VIN {} is correct." ,
244
244
vin
245
- ) )
245
+ ) ) ;
246
246
}
247
247
248
248
debug ! ( "Received response {:?}" , response) ;
You can’t perform that action at this time.
0 commit comments