Skip to content

Conversation

@photovoltex
Copy link
Member

Removes the async-trait crate as our MSRV is higher then 1.75, which introduced the feature.

This change is not necessary and sadly doesn't remove async-trait from our build chain completely, as zbus still includes it. I looked into removing async-trait from zbus... but they use it so much, that removing it is a huge task itself.

Copilot AI review requested due to automatic review settings November 14, 2025 20:30
Copilot finished reviewing on behalf of photovoltex November 14, 2025 20:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the async-trait crate dependency from the librespot-metadata module, taking advantage of native async trait support introduced in Rust 1.75. The MSRV is now above this version, making the external crate unnecessary.

Key changes:

  • Converted the Metadata trait from using #[async_trait] to native async trait syntax with impl Future return types
  • Removed all #[async_trait] annotations from trait implementations across multiple metadata types
  • Extracted the common logic from the default get implementation into a new helper function map_request_to_message

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
metadata/Cargo.toml Removed async-trait = "0.1" dependency
Cargo.lock Removed async-trait from librespot-metadata dependencies
metadata/src/lib.rs Converted Metadata trait to use native async trait syntax, added helper function
metadata/src/track.rs Removed #[async_trait] annotation from Metadata implementation
metadata/src/album.rs Removed #[async_trait] annotation from Metadata implementation
metadata/src/artist.rs Removed #[async_trait] annotation from Metadata implementation
metadata/src/episode.rs Removed #[async_trait] annotation from Metadata implementation
metadata/src/show.rs Removed #[async_trait] annotation from Metadata implementation
metadata/src/request.rs Removed #[async_trait] annotation from MercuryRequest trait
metadata/src/playlist/list.rs Removed #[async_trait] annotation from Metadata implementation
metadata/src/playlist/annotation.rs Removed #[async_trait] annotation from Metadata implementation
CHANGELOG.md Added breaking change entry for async-trait removal

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant