[PR #1040] [MERGED] Return iterators instead of collected vecs #1205

Closed
opened 2026-02-27 20:01:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/1040
Author: @dnlmlr
Created: 8/3/2022
Status: Merged
Merged: 8/3/2022
Merged by: @roderickvd

Base: devHead: metadata-iterators-instead-of-vecs


📝 Commits (1)

  • 176a47f Return iterators instead of collected vecs

📊 Changes

4 files changed (+11 additions, -26 deletions)

View changed files

📝 examples/playlist_tracks.rs (+1 -1)
📝 metadata/src/album.rs (+2 -7)
📝 metadata/src/artist.rs (+6 -11)
📝 metadata/src/playlist/list.rs (+2 -7)

📄 Description

  • 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 instead of the actual SpotifyId since that is a bit more versatile. Especially if at some point in the Track ids would get replaced by non Copy types like actual Tracks. Something like that was done with Artists in #1018 . If this is not desired it will of course be changed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/1040 **Author:** [@dnlmlr](https://github.com/dnlmlr) **Created:** 8/3/2022 **Status:** ✅ Merged **Merged:** 8/3/2022 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `metadata-iterators-instead-of-vecs` --- ### 📝 Commits (1) - [`176a47f`](https://github.com/librespot-org/librespot/commit/176a47f10fa3f93f5d987a075d7546c5c42c07c7) Return iterators instead of collected vecs ### 📊 Changes **4 files changed** (+11 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `examples/playlist_tracks.rs` (+1 -1) 📝 `metadata/src/album.rs` (+2 -7) 📝 `metadata/src/artist.rs` (+6 -11) 📝 `metadata/src/playlist/list.rs` (+2 -7) </details> ### 📄 Description - 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 instead of the actual `SpotifyId` since that is a bit more versatile. Especially if at some point in the Track ids would get replaced by non Copy types like actual Tracks. Something like that was done with `Artists` in #1018 . If this is not desired it will of course be changed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1205
No description provided.