@@ -426,7 +426,7 @@ impl ImageProxy {
426426 } ;
427427
428428 // Verify semantic version
429- let protover = r. impl_request :: < String > ( "Initialize" , [ ( ) ; 0 ] ) . await ?. 0 ;
429+ let protover: String = r. impl_request ( "Initialize" , [ ( ) ; 0 ] ) . await ?. 0 ;
430430 tracing:: debug!( "Remote protocol version: {protover}" ) ;
431431 let protover = semver:: Version :: parse ( protover. as_str ( ) ) ?;
432432 // Previously we had a feature to opt-in to requiring newer versions using `if cfg!()`.
@@ -523,18 +523,14 @@ impl ImageProxy {
523523 #[ instrument]
524524 pub async fn open_image ( & self , imgref : & str ) -> Result < OpenedImage > {
525525 tracing:: debug!( "opening image" ) ;
526- let ( imgid, _) = self
527- . impl_request :: < u32 > ( "OpenImage" , [ imgref] )
528- . await ?;
526+ let ( imgid, _) = self . impl_request ( "OpenImage" , [ imgref] ) . await ?;
529527 Ok ( OpenedImage ( imgid) )
530528 }
531529
532530 #[ instrument]
533531 pub async fn open_image_optional ( & self , imgref : & str ) -> Result < Option < OpenedImage > > {
534532 tracing:: debug!( "opening image" ) ;
535- let ( imgid, _) = self
536- . impl_request :: < u32 > ( "OpenImageOptional" , [ imgref] )
537- . await ?;
533+ let ( imgid, _) = self . impl_request ( "OpenImageOptional" , [ imgref] ) . await ?;
538534 if imgid == 0 {
539535 Ok ( None )
540536 } else {
@@ -586,9 +582,7 @@ impl ImageProxy {
586582 /// Fetch the config.
587583 /// For more information on OCI config, see <https://github.com/opencontainers/image-spec/blob/main/config.md>
588584 pub async fn fetch_config_raw ( & self , img : & OpenedImage ) -> Result < Vec < u8 > > {
589- let ( _, fd) = self
590- . impl_request :: < ( ) > ( "GetFullConfig" , [ img. 0 ] )
591- . await ?;
585+ let ( ( ) , fd) = self . impl_request ( "GetFullConfig" , [ img. 0 ] ) . await ?;
592586 self . read_all_fd ( fd) . await
593587 }
594588
@@ -626,7 +620,8 @@ impl ImageProxy {
626620 tracing:: debug!( "fetching blob" ) ;
627621 let args: Vec < serde_json:: Value > =
628622 vec ! [ img. 0 . into( ) , digest. to_string( ) . into( ) , size. into( ) ] ;
629- let ( _bloblen, fd) = self . impl_request :: < i64 > ( "GetBlob" , args) . await ?;
623+ let ( bloblen, fd) = self . impl_request ( "GetBlob" , args) . await ?;
624+ let _: u64 = bloblen;
630625 let fd = fd. ok_or_else ( || Error :: Other ( "Missing fd from reply" . into ( ) ) ) ?;
631626 let FileDescriptors :: FinishPipe { pipeid, datafd } = fd else {
632627 return Err ( Error :: Other ( "got dualfds, expecting FinishPipe fd" . into ( ) ) ) ;
@@ -678,7 +673,7 @@ impl ImageProxy {
678673 ) > {
679674 tracing:: debug!( "fetching blob" ) ;
680675 let args: Vec < serde_json:: Value > = vec ! [ img. 0 . into( ) , digest. to_string( ) . into( ) ] ;
681- let ( bloblen, fd) = self . impl_request :: < u64 > ( "GetRawBlob" , args) . await ?;
676+ let ( bloblen, fd) = self . impl_request ( "GetRawBlob" , args) . await ?;
682677 let fd = fd. ok_or_else ( || Error :: new_other ( "Missing fd from reply" ) ) ?;
683678 let FileDescriptors :: DualFds { datafd, errfd } = fd else {
684679 return Err ( Error :: Other ( "got single fd, expecting dual fds" . into ( ) ) ) ;
@@ -710,9 +705,7 @@ impl ImageProxy {
710705 ) -> Result < Option < Vec < ConvertedLayerInfo > > > {
711706 tracing:: debug!( "Getting layer info" ) ;
712707 if layer_info_piped_proto_version ( ) . matches ( & self . protover ) {
713- let ( _, fd) = self
714- . impl_request :: < ( ) > ( "GetLayerInfoPiped" , [ img. 0 ] )
715- . await ?;
708+ let ( ( ) , fd) = self . impl_request ( "GetLayerInfoPiped" , [ img. 0 ] ) . await ?;
716709 let buf = self . read_all_fd ( fd) . await ?;
717710 return Ok ( Some ( serde_json:: from_slice ( & buf) ?) ) ;
718711 }
0 commit comments