mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
chore(audio): satisfy clippy::question_mark on the hi-res spill read (#1269)
Rust 1.97 flags the `match spill_path { Some(p) => …, None => return None }`
as a `?` in disguise, which fails `cargo clippy -- -D warnings` on CI for every
Rust pull request. Same control flow, written the way the lint asks for.
This commit is contained in:
@@ -123,10 +123,8 @@ fn resolve_cached_play_input(engine: &AudioEngine, url: &str) -> Option<PlayInpu
|
||||
.filter(|s| s.url == url)
|
||||
.map(|s| s.path.clone())
|
||||
};
|
||||
match spill_path {
|
||||
Some(p) => std::fs::read(&p).ok()?,
|
||||
None => return None,
|
||||
}
|
||||
let path = spill_path?;
|
||||
std::fs::read(&path).ok()?
|
||||
};
|
||||
Some(PlayInput::Bytes(bytes))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user