http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.46k stars 119 forks source link

use async_trait to simplify async signatures #204

Closed Fishrock123 closed 4 years ago

Fishrock123 commented 4 years ago

Same as https://github.com/http-rs/tide/pull/639

This change does not actually alter the output code, but hides the use of Pin<Box<dyn Future<Output = T> + Send>> behind async_trait

This simplifies middleware struct definitions.

This also removes futures in favor of futures_util.