src: drop a lot of unwraps()

This commit is contained in:
2026-06-22 10:23:24 +02:00
parent 70ec40a880
commit 7cbff539df
8 changed files with 142 additions and 87 deletions
+3 -3
View File
@@ -32,7 +32,7 @@ pub struct BandcampSource;
impl DataSource for BandcampSource {
type Args = BandcampQueryArgs;
type Error = ();
type Error = bandcamp::Error;
async fn synchronize(&self, _artifact: &mut Artifact) -> Result<Vec<Artifact>, Self::Error> {
todo!()
@@ -47,11 +47,11 @@ impl DataSource for BandcampSource {
match result {
SearchResultItem::Artist(data) => {
// TODO: The artist and album detailed fetchers should also be separate args
let result = bandcamp::fetch_artist(data.artist_id).await.unwrap().into();
let result = bandcamp::fetch_artist(data.artist_id).await?.into();
json_results.push(result);
},
SearchResultItem::Album(data) => {
let result = bandcamp::fetch_album(data.band_id, data.album_id).await.unwrap().into();
let result = bandcamp::fetch_album(data.band_id, data.album_id).await?.into();
json_results.push(result);
},
SearchResultItem::Track(data) => {