fix
Some checks failed
Cargo CI / Build and Test (pull_request) Failing after 2m12s
Cargo CI / Lint (pull_request) Failing after 40s

This commit is contained in:
Wojciech Kozlowski 2025-01-11 16:40:18 +01:00
parent 65299269c4
commit 7b6cb56066

View File

@ -156,7 +156,7 @@ impl<SDB: for<'conn> ISqlDatabaseBackend<'conn>> IDatabase for SqlDatabase<SDB>
let version = tx
.select_database_version()?
.ok_or_else(|| LoadError::SerDeError(String::from("missing database version")))?;
.ok_or_else(|| Error::SerDeError(String::from("missing database version")))?;
let database = match version.as_str() {
V20250103 => {
@ -164,14 +164,10 @@ impl<SDB: for<'conn> ISqlDatabaseBackend<'conn>> IDatabase for SqlDatabase<SDB>
for artist in coll.iter_mut() {
artist.albums.extend(tx.select_artist_albums(&artist.name)?);
}
DeserializeDatabase::V20250103(coll)
Ok(DeserializeDatabase::V20250103(coll))
}
s => {
return Err(LoadError::SerDeError(format!(
"unknown database version: {s}"
)))
}
};
s => Err(Error::SerDeError(format!("unknown database version: {s}"))),
}?;
tx.commit()?;
Ok(database.into())