[PR #1037] [MERGED] Implement DerefMut for wrapper types in metadata #1204

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

📋 Pull Request Information

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

Base: devHead: metadata-wrappers-deref-mut


📝 Commits (2)

  • a7fa0e2 Implement DerefMut for wrapper types in metadata
  • 0c69126 Rename from_repeated_* functions to impl_*

📊 Changes

19 files changed (+164 additions, -271 deletions)

View changed files

📝 metadata/src/album.rs (+16 -18)
📝 metadata/src/artist.rs (+15 -50)
📝 metadata/src/audio/file.rs (+8 -7)
📝 metadata/src/availability.rs (+4 -9)
📝 metadata/src/content_rating.rs (+7 -9)
📝 metadata/src/copyright.rs (+7 -9)
📝 metadata/src/episode.rs (+4 -9)
📝 metadata/src/external_id.rs (+7 -9)
📝 metadata/src/image.rs (+8 -23)
📝 metadata/src/playlist/attribute.rs (+10 -22)
📝 metadata/src/playlist/item.rs (+6 -16)
📝 metadata/src/playlist/list.rs (+7 -22)
📝 metadata/src/playlist/operation.rs (+4 -9)
📝 metadata/src/playlist/permission.rs (+7 -9)
📝 metadata/src/restriction.rs (+10 -16)
📝 metadata/src/sale_period.rs (+7 -9)
📝 metadata/src/track.rs (+4 -9)
📝 metadata/src/util.rs (+26 -7)
📝 metadata/src/video.rs (+7 -9)

📄 Description

  • Change the Deref implementations for metadata wrapper types to use a
    new impl_deref_wrapped macro
  • The macro implements Deref and DerefMut

🔄 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/1037 **Author:** [@dnlmlr](https://github.com/dnlmlr) **Created:** 8/2/2022 **Status:** ✅ Merged **Merged:** 8/2/2022 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `metadata-wrappers-deref-mut` --- ### 📝 Commits (2) - [`a7fa0e2`](https://github.com/librespot-org/librespot/commit/a7fa0e2299d1567d65e768e3ca617d61a14c02d2) Implement `DerefMut` for wrapper types in metadata - [`0c69126`](https://github.com/librespot-org/librespot/commit/0c69126065dfc6e7d28d0f5575cd166e71ddb926) Rename `from_repeated_*` functions to `impl_*` ### 📊 Changes **19 files changed** (+164 additions, -271 deletions) <details> <summary>View changed files</summary> 📝 `metadata/src/album.rs` (+16 -18) 📝 `metadata/src/artist.rs` (+15 -50) 📝 `metadata/src/audio/file.rs` (+8 -7) 📝 `metadata/src/availability.rs` (+4 -9) 📝 `metadata/src/content_rating.rs` (+7 -9) 📝 `metadata/src/copyright.rs` (+7 -9) 📝 `metadata/src/episode.rs` (+4 -9) 📝 `metadata/src/external_id.rs` (+7 -9) 📝 `metadata/src/image.rs` (+8 -23) 📝 `metadata/src/playlist/attribute.rs` (+10 -22) 📝 `metadata/src/playlist/item.rs` (+6 -16) 📝 `metadata/src/playlist/list.rs` (+7 -22) 📝 `metadata/src/playlist/operation.rs` (+4 -9) 📝 `metadata/src/playlist/permission.rs` (+7 -9) 📝 `metadata/src/restriction.rs` (+10 -16) 📝 `metadata/src/sale_period.rs` (+7 -9) 📝 `metadata/src/track.rs` (+4 -9) 📝 `metadata/src/util.rs` (+26 -7) 📝 `metadata/src/video.rs` (+7 -9) </details> ### 📄 Description - Change the `Deref` implementations for metadata wrapper types to use a new `impl_deref_wrapped` macro - The macro implements `Deref` and `DerefMut` --- <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:33 +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#1204
No description provided.