You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Darwin mx.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:33:00 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T6031 arm64
Crates
tower-http = { version = "0.5", features = ["fs"] }
features = ["full"] also result in the same compile error.
Description
When using the new tower-http 0.5.0 with ServeDir,
pubfnserve_dir() -> MethodRouter{asyncfnhandle_404() -> (StatusCode,&'static str){(StatusCode::NOT_FOUND,"Resource not found.")}any_service(ServeDir::new("./").not_found_service(handle_404.into_service()))}
This work with tower-http 0.4, but fail to compile with tower-http 0.5 with the following error:
the trait bound `tower_http::services::ServeDir<tower_http::set_status::SetStatus<axum::handler::HandlerService<fn() -> impl std::future::Future<Output = (axum::http::StatusCode, &'static str)> {web::routes_static::serve_dir::handle_404}, ((),), (), _>>>: tower_service::Service<axum::http::Request<_>>` is not satisfied
the trait `tower_service::Service<http::request::Request<ReqBody>>` is implemented for `tower_http::services::ServeDir<F>`
Bug Report
Version
Platform
M3 Mac Book Pro
Darwin mx.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:33:00 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T6031 arm64
Crates
features = ["full"]
also result in the same compile error.Description
When using the new tower-http 0.5.0 with ServeDir,
This work with tower-http 0.4, but fail to compile with tower-http 0.5 with the following error:
Something like that fail as well:
The text was updated successfully, but these errors were encountered: