File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ pub trait BlockDevice {
2424 }
2525 /// Flushes write buffers to the underlying storage medium
2626 async fn flush ( & mut self ) -> io:: Result < ( ) > {
27- Ok ( ( ) )
27+ Ok ( ( ) )
2828 }
2929 /// Marks blocks as unused
3030 async fn trim ( & mut self , _offset : u64 , _size : usize ) -> io:: Result < ( ) > {
31- Ok ( ( ) )
31+ Ok ( ( ) )
3232 }
3333}
3434
@@ -187,12 +187,12 @@ where
187187 let rc = Pin :: new ( client) . poll_read ( cx, & mut read_buf) ;
188188 match rc {
189189 Poll :: Ready ( Ok ( ( ) ) ) => {
190- if read_buf. filled ( ) . is_empty ( ) {
191- return Poll :: Ready ( None ) ;
192- }
193- if read_buf. filled ( ) . len ( ) != nbd:: SIZE_OF_REQUEST {
194- return Poll :: Ready ( Some ( Err ( io:: Error :: from ( io:: ErrorKind :: UnexpectedEof ) ) ) ) ;
195- }
190+ if read_buf. filled ( ) . is_empty ( ) {
191+ return Poll :: Ready ( None ) ;
192+ }
193+ if read_buf. filled ( ) . len ( ) != nbd:: SIZE_OF_REQUEST {
194+ return Poll :: Ready ( Some ( Err ( io:: Error :: from ( io:: ErrorKind :: UnexpectedEof ) ) ) ) ;
195+ }
196196 }
197197 Poll :: Ready ( Err ( err) ) => return Poll :: Ready ( Some ( Err ( err) ) ) ,
198198 Poll :: Pending => {
You can’t perform that action at this time.
0 commit comments