Warning fixes
This commit is contained in:
@@ -67,8 +67,7 @@ impl Song {
|
||||
|
||||
pub fn song_path(&self) -> Result<String, std::io::Error> {
|
||||
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 {
|
||||
|
Reference in New Issue
Block a user