From 9f7b5fa9ea3684a38f032a09a54ec65f9841d2f5 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Fri, 1 Aug 2025 21:20:07 +0300 Subject: [PATCH] sound: enable workspace-wide lints Signed-off-by: Manos Pitsidianakis --- vhost-device-sound/Cargo.toml | 3 +++ vhost-device-sound/src/stream.rs | 13 ++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/vhost-device-sound/Cargo.toml b/vhost-device-sound/Cargo.toml index 0355ca7..035aaeb 100644 --- a/vhost-device-sound/Cargo.toml +++ b/vhost-device-sound/Cargo.toml @@ -42,3 +42,6 @@ vm-memory = { version = "0.16.1", features = ["backend-mmap", "backend-atomic"] [target.'cfg(target_env = "gnu")'.dev-dependencies] rand = { version = "0.9.2" } rusty-fork = { version = "0.3.0" } + +[lints] +workspace = true diff --git a/vhost-device-sound/src/stream.rs b/vhost-device-sound/src/stream.rs index f6259e9..36f3b84 100644 --- a/vhost-device-sound/src/stream.rs +++ b/vhost-device-sound/src/stream.rs @@ -156,21 +156,20 @@ impl PCMState { impl std::fmt::Display for PCMState { fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result { - use PCMState::*; - match *self { - SetParameters => { + match self { + Self::SetParameters => { write!(fmt, "VIRTIO_SND_R_PCM_SET_PARAMS") } - Prepare => { + Self::Prepare => { write!(fmt, "VIRTIO_SND_R_PCM_PREPARE") } - Release => { + Self::Release => { write!(fmt, "VIRTIO_SND_R_PCM_RELEASE") } - Start => { + Self::Start => { write!(fmt, "VIRTIO_SND_R_PCM_START") } - Stop => { + Self::Stop => { write!(fmt, "VIRTIO_SND_R_PCM_STOP") } }