docs: small overall documentation improvements (#1381)
* docs: small overall documentation improvements - Add documentation comments to various items - Change web API return types from bool/Option to Result - Create helper functions with descriptive names instead of comments - Remove redundant/confusing types - Fix some documentation comments as instructed by `cargo doc` - Rename variables to clear names * docs: small fixes to the documentation update
This commit is contained in:
@@ -278,6 +278,7 @@ impl ListItem for Track {
|
||||
spotify
|
||||
.api
|
||||
.recommendations(None, None, Some(vec![id]))
|
||||
.ok()
|
||||
.map(|r| r.tracks)
|
||||
.map(|tracks| tracks.iter().map(Self::from).collect())
|
||||
} else {
|
||||
@@ -309,7 +310,7 @@ impl ListItem for Track {
|
||||
let spotify = queue.get_spotify();
|
||||
|
||||
match self.album_id {
|
||||
Some(ref album_id) => spotify.api.album(album_id).map(|ref fa| fa.into()),
|
||||
Some(ref album_id) => spotify.api.album(album_id).map(|ref fa| fa.into()).ok(),
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user