Warning fixes

This commit is contained in:
2025-06-29 13:33:25 -04:00
parent 155cab4e53
commit ba208e8807

View File

@@ -67,8 +67,7 @@ impl Song {
pub fn song_path(&self) -> Result<String, std::io::Error> { pub fn song_path(&self) -> Result<String, std::io::Error> {
if self.directory.is_empty() { if self.directory.is_empty() {
return Err(std::io::Error::new( return Err(std::io::Error::other(
std::io::ErrorKind::Other,
"Directory does not exist", "Directory does not exist",
)); ));
} }
@@ -86,8 +85,7 @@ impl Song {
Ok(buffer) Ok(buffer)
} else { } else {
Err(std::io::Error::new( Err(std::io::Error::other(
std::io::ErrorKind::Other,
"Could not access last character of directory", "Could not access last character of directory",
)) ))
} }
@@ -103,8 +101,7 @@ impl Song {
file.read_to_end(&mut buffer)?; file.read_to_end(&mut buffer)?;
if buffer.is_empty() { if buffer.is_empty() {
Err(std::io::Error::new( Err(std::io::Error::other(
std::io::ErrorKind::Other,
"File is empty", "File is empty",
)) ))
} else { } else {