Hey Guys,
i am trying to pull out routes definition in a separate function using the Warp HttpServer but i get an error in line routes fn of the linked github.com code here:
pub fn routes(
state: AppState,
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
//See the playgroung link in link 139 for the error
}
the trait bound impl warp::Future<Output = Result<Json, ErrorResponse>>: Reply is not satisfied
the following other types implement trait Reply:
&'static [u8]
&'static str
(T,)
Box
Cow<'static, str>
ErrorResponse
Html
Infallible
and 17 others
required because of the requirements on the impl of Reply for (impl warp::Future<Output = Result<Json, ErrorResponse>>,)
2 redundant requirements hidden
required because of the requirements on the impl of Reply for (warp::generic::Either<(warp::generic::Either<(&'static str,), (&'static str,)>,), (impl warp::Future<Output = Result<Json, ErrorResponse>>,)>,)