diff options
Diffstat (limited to 'devices/src/virtio/block.rs')
-rw-r--r-- | devices/src/virtio/block.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/devices/src/virtio/block.rs b/devices/src/virtio/block.rs index 7d5fb02..f817e89 100644 --- a/devices/src/virtio/block.rs +++ b/devices/src/virtio/block.rs @@ -28,7 +28,7 @@ use super::{ }; const QUEUE_SIZE: u16 = 256; -const QUEUE_SIZES: &'static [u16] = &[QUEUE_SIZE]; +const QUEUE_SIZES: &[u16] = &[QUEUE_SIZE]; const SECTOR_SHIFT: u8 = 9; const SECTOR_SIZE: u64 = 0x01 << SECTOR_SHIFT; const MAX_DISCARD_SECTORS: u32 = u32::MAX; @@ -212,14 +212,14 @@ enum ExecuteError { impl ExecuteError { fn status(&self) -> u8 { match self { - &ExecuteError::Flush(_) => VIRTIO_BLK_S_IOERR, - &ExecuteError::Read { .. } => VIRTIO_BLK_S_IOERR, - &ExecuteError::Seek { .. } => VIRTIO_BLK_S_IOERR, - &ExecuteError::TimerFd(_) => VIRTIO_BLK_S_IOERR, - &ExecuteError::Write { .. } => VIRTIO_BLK_S_IOERR, - &ExecuteError::DiscardWriteZeroes { .. } => VIRTIO_BLK_S_IOERR, - &ExecuteError::ReadOnly { .. } => VIRTIO_BLK_S_IOERR, - &ExecuteError::Unsupported(_) => VIRTIO_BLK_S_UNSUPP, + ExecuteError::Flush(_) => VIRTIO_BLK_S_IOERR, + ExecuteError::Read { .. } => VIRTIO_BLK_S_IOERR, + ExecuteError::Seek { .. } => VIRTIO_BLK_S_IOERR, + ExecuteError::TimerFd(_) => VIRTIO_BLK_S_IOERR, + ExecuteError::Write { .. } => VIRTIO_BLK_S_IOERR, + ExecuteError::DiscardWriteZeroes { .. } => VIRTIO_BLK_S_IOERR, + ExecuteError::ReadOnly { .. } => VIRTIO_BLK_S_IOERR, + ExecuteError::Unsupported(_) => VIRTIO_BLK_S_UNSUPP, } } } |