Skip to content

Commit ec25d8a

Browse files
committed
device.rs: formatting
1 parent 6cdd844 commit ec25d8a

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/device.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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 => {

0 commit comments

Comments
 (0)