From ba208e8807c5ca3117ea956728cf3f63e3a6a616 Mon Sep 17 00:00:00 2001 From: phoenix Date: Sun, 29 Jun 2025 13:33:25 -0400 Subject: [PATCH] Warning fixes --- src/song.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/song.rs b/src/song.rs index 16f622d..d26299b 100644 --- a/src/song.rs +++ b/src/song.rs @@ -67,8 +67,7 @@ impl Song { pub fn song_path(&self) -> Result { if self.directory.is_empty() { - return Err(std::io::Error::new( - std::io::ErrorKind::Other, + return Err(std::io::Error::other( "Directory does not exist", )); } @@ -86,8 +85,7 @@ impl Song { Ok(buffer) } else { - Err(std::io::Error::new( - std::io::ErrorKind::Other, + Err(std::io::Error::other( "Could not access last character of directory", )) } @@ -103,8 +101,7 @@ impl Song { file.read_to_end(&mut buffer)?; if buffer.is_empty() { - Err(std::io::Error::new( - std::io::ErrorKind::Other, + Err(std::io::Error::other( "File is empty", )) } else {