1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 09:49:31 +02:00

Return iterators instead of collected vecs

- Change the return type of metadata convenience iter functions to
  actual iterators instead of allocated collections
- The iterator item type is set to be a reference
This commit is contained in:
Daniel M 2022-08-03 16:13:13 +02:00
parent cdf84925ad
commit 176a47f10f
4 changed files with 11 additions and 26 deletions

View file

@ -36,7 +36,7 @@ async fn main() {
let plist = Playlist::get(&session, plist_uri).await.unwrap();
println!("{:?}", plist);
for track_id in plist.tracks() {
let plist_track = Track::get(&session, track_id).await.unwrap();
let plist_track = Track::get(&session, *track_id).await.unwrap();
println!("track: {} ", plist_track.name);
}
}