@@ -12,39 +12,39 @@ use uefi_raw::protocol::network::http::HttpStatusCode;
12
12
13
13
pub fn print_handle_devpath ( prefix : & str , handle : & Handle ) {
14
14
let Ok ( dp) = boot:: open_protocol_exclusive :: < DevicePath > ( * handle) else {
15
- info ! ( "{}no device path for handle" , prefix ) ;
15
+ info ! ( "{prefix }no device path for handle" ) ;
16
16
return ;
17
17
} ;
18
18
if let Ok ( string) = dp. to_string ( DisplayOnly ( true ) , AllowShortcuts ( true ) ) {
19
- info ! ( "{}{}" , prefix , string ) ;
19
+ info ! ( "{prefix}{string}" ) ;
20
20
}
21
21
}
22
22
23
23
fn fetch_http ( handle : Handle , url : & str ) -> Option < Vec < u8 > > {
24
- info ! ( "http: fetching {} ..." , url ) ;
24
+ info ! ( "http: fetching {url } ..." ) ;
25
25
26
26
let http_res = HttpHelper :: new ( handle) ;
27
27
if let Err ( e) = http_res {
28
- error ! ( "http new: {}" , e ) ;
28
+ error ! ( "http new: {e}" ) ;
29
29
return None ;
30
30
}
31
31
let mut http = http_res. unwrap ( ) ;
32
32
33
33
let res = http. configure ( ) ;
34
34
if let Err ( e) = res {
35
- error ! ( "http configure: {}" , e ) ;
35
+ error ! ( "http configure: {e}" ) ;
36
36
return None ;
37
37
}
38
38
39
39
let res = http. request_get ( url) ;
40
40
if let Err ( e) = res {
41
- error ! ( "http request: {}" , e ) ;
41
+ error ! ( "http request: {e}" ) ;
42
42
return None ;
43
43
}
44
44
45
45
let res = http. response_first ( true ) ;
46
46
if let Err ( e) = res {
47
- error ! ( "http response: {}" , e ) ;
47
+ error ! ( "http response: {e}" ) ;
48
48
return None ;
49
49
}
50
50
@@ -64,7 +64,7 @@ fn fetch_http(handle: Handle, url: &str) -> Option<Vec<u8>> {
64
64
error ! ( "parse content length ({})" , cl_hdr. 1 ) ;
65
65
return None ;
66
66
} ;
67
- info ! ( "http: size is {} bytes" , cl ) ;
67
+ info ! ( "http: size is {cl } bytes" ) ;
68
68
69
69
let mut data = rsp. body ;
70
70
loop {
@@ -74,7 +74,7 @@ fn fetch_http(handle: Handle, url: &str) -> Option<Vec<u8>> {
74
74
75
75
let res = http. response_more ( ) ;
76
76
if let Err ( e) = res {
77
- error ! ( "read response: {}" , e ) ;
77
+ error ! ( "read response: {e}" ) ;
78
78
return None ;
79
79
}
80
80
0 commit comments