mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
database: Fix some clippy warnings
This commit is contained in:
parent
f967f6ade9
commit
2b95dbeadd
3 changed files with 43 additions and 47 deletions
|
|
@ -267,10 +267,8 @@ impl Database {
|
|||
|
||||
for part_index in work_parts {
|
||||
if !part_index.is_empty() {
|
||||
let index = str::parse(part_index).or(Err(Error::ParsingError(
|
||||
"part index",
|
||||
String::from(part_index),
|
||||
)))?;
|
||||
let index = str::parse(part_index)
|
||||
.map_err(|_| Error::ParsingError("part index", String::from(part_index)))?;
|
||||
|
||||
part_indices.push(index);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue