rust std change #42

Merged
phoenix merged 11 commits from rust_std_change into devel 2025-06-29 17:37:14 +00:00
Showing only changes of commit ba208e8807 - Show all commits

View File

@@ -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 {