@@ -12,39 +12,39 @@ use uefi_raw::protocol::network::http::HttpStatusCode;
1212
1313pub fn print_handle_devpath ( prefix : & str , handle : & Handle ) {
1414 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" ) ;
1616 return ;
1717 } ;
1818 if let Ok ( string) = dp. to_string ( DisplayOnly ( true ) , AllowShortcuts ( true ) ) {
19- info ! ( "{}{}" , prefix , string ) ;
19+ info ! ( "{prefix}{string}" ) ;
2020 }
2121}
2222
2323fn fetch_http ( handle : Handle , url : & str ) -> Option < Vec < u8 > > {
24- info ! ( "http: fetching {} ..." , url ) ;
24+ info ! ( "http: fetching {url } ..." ) ;
2525
2626 let http_res = HttpHelper :: new ( handle) ;
2727 if let Err ( e) = http_res {
28- error ! ( "http new: {}" , e ) ;
28+ error ! ( "http new: {e}" ) ;
2929 return None ;
3030 }
3131 let mut http = http_res. unwrap ( ) ;
3232
3333 let res = http. configure ( ) ;
3434 if let Err ( e) = res {
35- error ! ( "http configure: {}" , e ) ;
35+ error ! ( "http configure: {e}" ) ;
3636 return None ;
3737 }
3838
3939 let res = http. request_get ( url) ;
4040 if let Err ( e) = res {
41- error ! ( "http request: {}" , e ) ;
41+ error ! ( "http request: {e}" ) ;
4242 return None ;
4343 }
4444
4545 let res = http. response_first ( true ) ;
4646 if let Err ( e) = res {
47- error ! ( "http response: {}" , e ) ;
47+ error ! ( "http response: {e}" ) ;
4848 return None ;
4949 }
5050
@@ -64,7 +64,7 @@ fn fetch_http(handle: Handle, url: &str) -> Option<Vec<u8>> {
6464 error ! ( "parse content length ({})" , cl_hdr. 1 ) ;
6565 return None ;
6666 } ;
67- info ! ( "http: size is {} bytes" , cl ) ;
67+ info ! ( "http: size is {cl } bytes" ) ;
6868
6969 let mut data = rsp. body ;
7070 loop {
@@ -74,7 +74,7 @@ fn fetch_http(handle: Handle, url: &str) -> Option<Vec<u8>> {
7474
7575 let res = http. response_more ( ) ;
7676 if let Err ( e) = res {
77- error ! ( "read response: {}" , e ) ;
77+ error ! ( "read response: {e}" ) ;
7878 return None ;
7979 }
8080
0 commit comments