@@ -440,13 +440,13 @@ impl Blobs {
440440 reader
441441 . recv_exact ( & mut size)
442442 . await
443- . map_err ( super :: Error :: other ) ?;
443+ . map_err ( io :: Error :: from ) ?;
444444 let size = u64:: from_le_bytes ( size) ;
445445 let Some ( size) = NonZeroU64 :: new ( size) else {
446446 return if hash == Hash :: EMPTY {
447447 Ok ( reader)
448448 } else {
449- Err ( super :: Error :: other ( "invalid size for hash" ) . into ( ) )
449+ Err ( io :: Error :: other ( "invalid size for hash" ) . into ( ) )
450450 } ;
451451 } ;
452452 let tree = BaoTree :: new ( size. get ( ) , IROH_BLOCK_SIZE ) ;
@@ -651,7 +651,7 @@ impl<'a> AddProgress<'a> {
651651 _ => { }
652652 }
653653 }
654- Err ( super :: Error :: other ( "unexpected end of stream" ) . into ( ) )
654+ Err ( io :: Error :: other ( "unexpected end of stream" ) . into ( ) )
655655 }
656656
657657 pub async fn with_named_tag ( self , name : impl AsRef < [ u8 ] > ) -> RequestResult < HashAndFormat > {
@@ -704,7 +704,7 @@ impl IntoFuture for ObserveProgress {
704704 let mut rx = self . inner . await ?;
705705 match rx. recv ( ) . await ? {
706706 Some ( bitfield) => Ok ( bitfield) ,
707- None => Err ( super :: Error :: other ( "unexpected end of stream" ) . into ( ) ) ,
707+ None => Err ( io :: Error :: other ( "unexpected end of stream" ) . into ( ) ) ,
708708 }
709709 } )
710710 }
@@ -726,7 +726,7 @@ impl ObserveProgress {
726726 return Ok ( item) ;
727727 }
728728 }
729- Err ( super :: Error :: other ( "unexpected end of stream" ) . into ( ) )
729+ Err ( io :: Error :: other ( "unexpected end of stream" ) . into ( ) )
730730 }
731731
732732 /// Returns an infinite stream of bitfields. The first bitfield is the
@@ -805,7 +805,7 @@ impl ExportProgress {
805805 if let Some ( size) = size {
806806 Ok ( size)
807807 } else {
808- Err ( super :: Error :: other ( "unexpected end of stream" ) . into ( ) )
808+ Err ( io :: Error :: other ( "unexpected end of stream" ) . into ( ) )
809809 }
810810 }
811811}
0 commit comments