mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[PR #337] [MERGED] Fix double referenced types in paginated endpoints #406
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#406
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ramsayleung/rspotify/pull/337
Author: @marioortizmanero
Created: 7/13/2022
Status: ✅ Merged
Merged: 10/4/2022
Merged by: @ramsayleung
Base:
master← Head:fix_double_reference_pagination📝 Commits (3)
122d22efix double referenced types in paginated endpoints081e890cargo fmt0a3c016fix clippy lints📊 Changes
15 files changed (+106 additions, -49 deletions)
View changed files
📝
rspotify-model/src/album.rs(+2 -2)📝
rspotify-model/src/lib.rs(+1 -1)📝
rspotify-model/src/playlist.rs(+2 -2)📝
rspotify-model/src/show.rs(+1 -1)📝
src/auth_code.rs(+1 -1)📝
src/auth_code_pkce.rs(+1 -1)📝
src/client_creds.rs(+1 -1)📝
src/clients/base.rs(+39 -24)📝
src/clients/mod.rs(+2 -2)📝
src/clients/pagination/iter.rs(+11 -0)📝
src/clients/pagination/mod.rs(+6 -2)📝
src/clients/pagination/stream.rs(+27 -0)📝
src/lib.rs(+6 -6)📝
tests/test_with_credential.rs(+4 -4)📝
tests/test_with_oauth.rs(+2 -2)📄 Description
Description
This removes the potential double reference to Id types (&'a Id<'_>)
which was previously required due to limitations in the async variant of
the
paginatefunction.Due to limitations in HRTBs (see
https://kevincox.ca/2022/04/16/rust-generic-closure-lifetimes/) it is
not possible, to write something like
Req: for<'a> Fn(&'a) -> ('a + Future<...>). The sync version remains almost unchanged.Motivation and Context
See #305
Dependencies
None
Type of change
Please delete options that are not relevant.
How has this been tested?
CI passes
Is this change properly documented?
No need, it's an internal change
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.