From fe1c81b58356edc23f4d53ee8f4f74498f2807aa Mon Sep 17 00:00:00 2001 From: Serial <69764315+Serial-ATA@users.noreply.github.com> Date: Tue, 6 Jul 2021 21:25:58 -0400 Subject: [PATCH] Remove pointless const Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com> --- src/components/logic/riff.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/logic/riff.rs b/src/components/logic/riff.rs index 0db69896..c9ad59c8 100644 --- a/src/components/logic/riff.rs +++ b/src/components/logic/riff.rs @@ -27,8 +27,6 @@ pub const ALBU: &[u8] = &[65, 76, 66, 85]; // Can album artist OR album title pub const TRAC: &[u8] = &[84, 82, 65, 67]; // Can represent track number OR total tracks pub const DISC: &[u8] = &[68, 73, 83, 67]; // Can represent disc number OR total discs -pub const NULL_CHAR: char = '\0'; - pub(crate) fn read_from(data: &mut T) -> Result> where T: Read + Seek, @@ -60,7 +58,7 @@ where cursor.read_exact(&mut buf)?; let val = String::from_utf8(buf)?; - metadata.insert(key.to_string(), val.trim_matches(NULL_CHAR).to_string()); + metadata.insert(key.to_string(), val.trim_matches('\0').to_string()); }, None => cursor.set_position(cursor.position() + size as u64), }