src: drop a lot of unwraps()
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user