Code formatting
All checks were successful
Rust Build / Check (pull_request) Successful in 25s
Rust Build / Test Suite (pull_request) Successful in 29s
Rust Build / Rustfmt (pull_request) Successful in 26s
Rust Build / Clippy (pull_request) Successful in 28s
Rust Build / build (pull_request) Successful in 27s
All checks were successful
Rust Build / Check (pull_request) Successful in 25s
Rust Build / Test Suite (pull_request) Successful in 29s
Rust Build / Rustfmt (pull_request) Successful in 26s
Rust Build / Clippy (pull_request) Successful in 28s
Rust Build / build (pull_request) Successful in 27s
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user