Use pin-project-lite instead of pin-project (#95)

This commit is contained in:
Sunli
2021-08-03 09:33:00 +02:00
committed by GitHub
parent ba74787532
commit be68227d73
12 changed files with 268 additions and 236 deletions
+9 -8
View File
@@ -7,7 +7,7 @@ use crate::{
use bytes::Bytes;
use futures_util::ready;
use http::Response;
use pin_project::pin_project;
use pin_project_lite::pin_project;
use std::{
future::Future,
pin::Pin,
@@ -15,13 +15,14 @@ use std::{
};
use tower::BoxError;
/// Response future for [`HandleError`](super::HandleError).
#[pin_project]
#[derive(Debug)]
pub struct HandleErrorFuture<Fut, F> {
#[pin]
pub(super) inner: Fut,
pub(super) f: Option<F>,
pin_project! {
/// Response future for [`HandleError`](super::HandleError).
#[derive(Debug)]
pub struct HandleErrorFuture<Fut, F> {
#[pin]
pub(super) inner: Fut,
pub(super) f: Option<F>,
}
}
impl<Fut, F, E, E2, B, Res> Future for HandleErrorFuture<Fut, F>