diff options
| author | Max Audron <me@audron.dev> | 2026-02-21 14:35:01 +0100 |
|---|---|---|
| committer | Max Audron <me@audron.dev> | 2026-02-21 14:35:01 +0100 |
| commit | f42ef4bec6d1c63c0d8564cfb06e996666dedbe3 (patch) | |
| tree | e526bf4cae5ecf798469acc157b14122d4a5e25a /src/primitive/bufferinfo.rs | |
| parent | replace all match_variant instances with try_into (diff) | |
clean up clippy lints
Diffstat (limited to 'src/primitive/bufferinfo.rs')
| -rw-r--r-- | src/primitive/bufferinfo.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/primitive/bufferinfo.rs b/src/primitive/bufferinfo.rs index 56d5cce..25edd0f 100644 --- a/src/primitive/bufferinfo.rs +++ b/src/primitive/bufferinfo.rs @@ -46,7 +46,7 @@ impl Deserialize for BufferInfo { // TODO is groupid let (size, name) = String::parse_utf8(&b[14..])?; - return Ok(( + Ok(( 14 + size, Self { id, @@ -54,7 +54,7 @@ impl Deserialize for BufferInfo { buffer_type: BufferType::from(buffer_type), name, }, - )); + )) } } @@ -75,10 +75,10 @@ pub enum BufferType { impl From<i16> for BufferType { fn from(value: i16) -> Self { match value { - 0x01 => return Self::Status, - 0x02 => return Self::Channel, - 0x04 => return Self::Query, - 0x08 => return Self::Group, + 0x01 => Self::Status, + 0x02 => Self::Channel, + 0x04 => Self::Query, + 0x08 => Self::Group, _ => unimplemented!(), } } |
