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
Setting up axum-analytics using the latest Axum v0.8.1 causes the following error:
error[E0277]: the trait bound `AnalyticsMiddleware<Route>:Service<axum::http::Request<axum::body::Body>>` is not satisfied
--> src/main.rs:157:16
|
157 | .layer(Analytics::new(settings.analytics_api_key.clone()))
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Service<axum::http::Request<axum::body::Body>>` is not implemented for `AnalyticsMiddleware<Route>`
| |
| required by a bound introduced by this call
|
= help: the trait `Service<axum::http::Request<axum_core::body::Body>>` is implemented for `AnalyticsMiddleware<S>`
note: required by a bound in `Router::<S>::layer`
--> /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/axum-0.8.1/src/routing/mod.rs:300:21
|
297 | pub fn layer<L>(self, layer:L) -> Router<S>
| ----- required by a bound in this associated function
...
300 | L::Service:Service<Request> + Clone + Send + Sync + 'static,
| ^^^^^^^^^^^^^^^^ required by this bound in `Router::<S>::layer`
This seems to be the case because Axum 0.8 starts requiring Sync. This should be fixed by updating the trait implementation.
The text was updated successfully, but these errors were encountered:
Setting up axum-analytics using the latest Axum v0.8.1 causes the following error:
This seems to be the case because Axum 0.8 starts requiring Sync. This should be fixed by updating the trait implementation.
The text was updated successfully, but these errors were encountered: