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 5b58c2b1a0 - Show all commits

View File

@@ -67,9 +67,7 @@ impl Song {
pub fn song_path(&self) -> Result<String, std::io::Error> {
if self.directory.is_empty() {
return Err(std::io::Error::other(
"Directory does not exist",
));
return Err(std::io::Error::other("Directory does not exist"));
}
let directory = &self.directory;
@@ -101,9 +99,7 @@ impl Song {
file.read_to_end(&mut buffer)?;
if buffer.is_empty() {
Err(std::io::Error::other(
"File is empty",
))
Err(std::io::Error::other("File is empty"))
} else {
Ok(buffer)
}