Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use async fn and return-position impl Trait in trait #393

Open
Emilgardis opened this issue Nov 14, 2023 · 1 comment
Open

use async fn and return-position impl Trait in trait #393

Emilgardis opened this issue Nov 14, 2023 · 1 comment

Comments

@Emilgardis
Copy link
Member

in 1.75 AFIT and RPITIT are stabilized, is there anything that needs this or would benefit from it?

@Nerixyz
Copy link
Contributor

Nerixyz commented Nov 14, 2023

I suppose Client::req could use this:

twitch_api/src/client.rs

Lines 174 to 179 in f7168f4

pub trait Client: Send + Sync {
/// Error returned by the client
type Error: Error + Send + Sync + 'static;
/// Send a request
fn req(&self, request: Request) -> BoxedFuture<'_, Result<Response, <Self as Client>::Error>>;
}

Basically most things that box stuff? Though some depend on other libraries.

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

No branches or pull requests

2 participants