Skip to content

Comments

refactor: use RPITIT over async_trait#177

Open
Nerixyz wants to merge 2 commits intomainfrom
refactor/async-fn
Open

refactor: use RPITIT over async_trait#177
Nerixyz wants to merge 2 commits intomainfrom
refactor/async-fn

Conversation

@Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jan 28, 2026

Towards #393. This removes the dependency on async_trait and uses RPITIT in Client and TwitchToken. Using async fn in the trait definition is not enough, because most executors want futures that are Send.

For the ReqwestClient, I kept the constraint that the returned future doesn't capture the lifetime of the client. TwitchToken and its implementations captured 'self and the client's lifetime already.

@Nerixyz
Copy link
Contributor Author

Nerixyz commented Jan 28, 2026

Not happy about having to bump the MSRV again because of + use<...>, but we need that to avoid capturing too many lifetimes if I understand correctly.

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