Created
November 2, 2019 15:37
-
-
Save justinas/904f1e16a5ba476ffc119f6cbf38ae7a to your computer and use it in GitHub Desktop.
Warp type error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0277]: the trait bound `(): warp::reply::Reply` is not satisfied | |
--> oon_web/src/main.rs:133:5 | |
| | |
133 | warp::serve(routes).run(([127u8, 0, 0, 1], port)).await; | |
| ^^^^^^^^^^^ the trait `warp::reply::Reply` is not implemented for `()` | |
| | |
::: /home/justinas/.cargo/git/checkouts/warp-4a034a455cef9a29/5c26956/src/server.rs:26:8 | |
| | |
26 | S: IntoWarpService + 'static, | |
| --------------- required by this bound in `warp::server::serve` | |
| | |
= note: required because of the requirements on the impl of `warp::reply::Reply` for `((),)` | |
= note: required because of the requirements on the impl of `warp::reply::Reply` for `warp::generic::Either<(warp::generic::Either<(warp::filters::fs::File,), (warp::filters::fs::File,)>,), ((),)>` | |
= note: required because of the requirements on the impl of `warp::reply::Reply` for `(warp::generic::Either<(warp::generic::Either<(warp::filters::fs::File,), (warp::filters::fs::File,)>,), ((),)>,)` | |
= note: required because of the requirements on the impl of `warp::reply::Reply` for `warp::generic::Either<(warp::generic::Either<(warp::generic::Either<(warp::filters::fs::File,), (warp::filters::fs::File,)>,), ((),)>,), (impl warp::reply::Reply,)>` | |
= note: required because of the requirements on the impl of `warp::reply::Reply` for `(warp::generic::Either<(warp::generic::Either<(warp::generic::Either<(warp::filters::fs::File,), (warp::filters::fs::File,)>,), ((),)>,), (impl warp::reply::Reply,)>,)` | |
= note: required because of the requirements on the impl of `warp::server::IntoWarpService` for `warp::filter::recover::Recover<warp::filter::or::Or<warp::filter::or::Or<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>, warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>>, warp::filter::map::Map<warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::map::Map<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::Filter+std::marker::Copy>, [closure@oon_web/src/main.rs:121:14: 121:36 db_arc:_]>, impl warp::filter::Filter+std::marker::Copy>, impl std::clone::Clone+warp::filter::Filter>, fn(std::sync::Arc<oon_db::Database>, types::GuessRequest, std::net::IpAddr) -> impl core::future::future::Future {guess_handler}>, [closure@oon_web/src/main.rs:125:14: 125:20]>>, fn(warp::reject::Rejection) -> impl core::future::future::Future {recover}>` | |
error[E0599]: no method named `run` found for type `warp::server::Server<warp::filter::recover::Recover<warp::filter::or::Or<warp::filter::or::Or<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>, warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>>, warp::filter::map::Map<warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::map::Map<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::Filter+std::marker::Copy>, [closure@oon_web/src/main.rs:121:14: 121:36 db_arc:_]>, impl warp::filter::Filter+std::marker::Copy>, impl std::clone::Clone+warp::filter::Filter>, fn(std::sync::Arc<oon_db::Database>, types::GuessRequest, std::net::IpAddr) -> impl core::future::future::Future {guess_handler}>, [closure@oon_web/src/main.rs:125:14: 125:20]>>, fn(warp::reject::Rejection) -> impl core::future::future::Future {recover}>>` in the current scope | |
--> oon_web/src/main.rs:133:25 | |
| | |
133 | warp::serve(routes).run(([127u8, 0, 0, 1], port)).await; | |
| ^^^ method not found in `warp::server::Server<warp::filter::recover::Recover<warp::filter::or::Or<warp::filter::or::Or<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>, warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>>, warp::filter::map::Map<warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::map::Map<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::Filter+std::marker::Copy>, [closure@oon_web/src/main.rs:121:14: 121:36 db_arc:_]>, impl warp::filter::Filter+std::marker::Copy>, impl std::clone::Clone+warp::filter::Filter>, fn(std::sync::Arc<oon_db::Database>, types::GuessRequest, std::net::IpAddr) -> impl core::future::future::Future {guess_handler}>, [closure@oon_web/src/main.rs:125:14: 125:20]>>, fn(warp::reject::Rejection) -> impl core::future::future::Future {recover}>>` | |
| | |
= note: the method `run` exists but the following trait bounds were not satisfied: | |
`(warp::generic::Either<(warp::generic::Either<(warp::generic::Either<(warp::filters::fs::File,), (warp::filters::fs::File,)>,), ((),)>,), (impl warp::reply::Reply,)>,) : warp::reply::Reply` | |
`warp::filter::recover::Recover<warp::filter::or::Or<warp::filter::or::Or<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>, warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>>, warp::filter::map::Map<warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::map::Map<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::Filter+std::marker::Copy>, [closure@oon_web/src/main.rs:121:14: 121:36 db_arc:_]>, impl warp::filter::Filter+std::marker::Copy>, impl std::clone::Clone+warp::filter::Filter>, fn(std::sync::Arc<oon_db::Database>, types::GuessRequest, std::net::IpAddr) -> impl core::future::future::Future {guess_handler}>, [closure@oon_web/src/main.rs:125:14: 125:20]>>, fn(warp::reject::Rejection) -> impl core::future::future::Future {recover}> : warp::server::IntoWarpService` | |
`warp::filter::service::FilteredService<warp::filter::recover::Recover<warp::filter::or::Or<warp::filter::or::Or<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>, warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::FilterClone>>, warp::filter::map::Map<warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::map::Map<warp::filter::and::And<impl warp::filter::Filter+std::marker::Copy, impl warp::filter::Filter+std::marker::Copy>, [closure@oon_web/src/main.rs:121:14: 121:36 db_arc:_]>, impl warp::filter::Filter+std::marker::Copy>, impl std::clone::Clone+warp::filter::Filter>, fn(std::sync::Arc<oon_db::Database>, types::GuessRequest, std::net::IpAddr) -> impl core::future::future::Future {guess_handler}>, [closure@oon_web/src/main.rs:125:14: 125:20]>>, fn(warp::reject::Rejection) -> impl core::future::future::Future {recover}>> : warp::server::WarpService` | |
error: aborting due to 2 previous errors | |
Some errors have detailed explanations: E0277, E0599. | |
For more information about an error, try `rustc --explain E0277`. | |
error: could not compile `oon_web`. | |
To learn more, run the command again with --verbose. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment