@@ -64,10 +64,10 @@ pub enum MemoryError {
6464/// `Write` respectively, by reading/writing using a bounce buffer, and memcpy-ing into the
6565/// [`VolatileSlice`].
6666#[ derive( Debug ) ]
67- pub struct Bounce < T > ( pub T , pub bool ) ;
67+ pub struct MaybeBounce < T > ( pub T , pub bool ) ;
6868
6969// FIXME: replace AsFd with ReadVolatile once &File: ReadVolatile in vm-memory.
70- impl < T : Read + AsFd > ReadVolatile for Bounce < T > {
70+ impl < T : Read + AsFd > ReadVolatile for MaybeBounce < T > {
7171 fn read_volatile < B : BitmapSlice > (
7272 & mut self ,
7373 buf : & mut VolatileSlice < B > ,
@@ -86,7 +86,7 @@ impl<T: Read + AsFd> ReadVolatile for Bounce<T> {
8686 }
8787}
8888
89- impl < T : Write + AsFd > WriteVolatile for Bounce < T > {
89+ impl < T : Write + AsFd > WriteVolatile for MaybeBounce < T > {
9090 fn write_volatile < B : BitmapSlice > (
9191 & mut self ,
9292 buf : & VolatileSlice < B > ,
@@ -103,13 +103,13 @@ impl<T: Write + AsFd> WriteVolatile for Bounce<T> {
103103 }
104104}
105105
106- impl < R : Read > Read for Bounce < R > {
106+ impl < R : Read > Read for MaybeBounce < R > {
107107 fn read ( & mut self , buf : & mut [ u8 ] ) -> std:: io:: Result < usize > {
108108 self . 0 . read ( buf)
109109 }
110110}
111111
112- impl < S : Seek > Seek for Bounce < S > {
112+ impl < S : Seek > Seek for MaybeBounce < S > {
113113 fn seek ( & mut self , pos : SeekFrom ) -> std:: io:: Result < u64 > {
114114 self . 0 . seek ( pos)
115115 }
@@ -950,10 +950,10 @@ mod tests {
950950
951951 let mut data = ( 0 ..=255 ) . collect_vec ( ) ;
952952
953- Bounce ( file_direct. as_file ( ) , false )
953+ MaybeBounce ( file_direct. as_file ( ) , false )
954954 . write_all_volatile ( & VolatileSlice :: from ( data. as_mut_slice ( ) ) )
955955 . unwrap ( ) ;
956- Bounce ( file_bounced. as_file ( ) , true )
956+ MaybeBounce ( file_bounced. as_file ( ) , true )
957957 . write_all_volatile ( & VolatileSlice :: from ( data. as_mut_slice ( ) ) )
958958 . unwrap ( ) ;
959959
@@ -963,10 +963,10 @@ mod tests {
963963 file_direct. as_file ( ) . seek ( SeekFrom :: Start ( 0 ) ) . unwrap ( ) ;
964964 file_bounced. as_file ( ) . seek ( SeekFrom :: Start ( 0 ) ) . unwrap ( ) ;
965965
966- Bounce ( file_direct. as_file ( ) , false )
966+ MaybeBounce ( file_direct. as_file ( ) , false )
967967 . read_exact_volatile ( & mut VolatileSlice :: from ( data_direct. as_mut_slice ( ) ) )
968968 . unwrap ( ) ;
969- Bounce ( file_bounced. as_file ( ) , true )
969+ MaybeBounce ( file_bounced. as_file ( ) , true )
970970 . read_exact_volatile ( & mut VolatileSlice :: from ( data_bounced. as_mut_slice ( ) ) )
971971 . unwrap ( ) ;
972972
0 commit comments