fix(deps): update rust crate tower-http to 0.5.1 - autoclosed #2243
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
5 errors and 2 warnings
expected `Pin<Box<dyn Future<Output = Result<Request<B>, Response<UnsyncBoxBody<Bytes, Error>>>> + Send>>` to be a future that resolves to `Result<Request<B>, Response<UnsyncBoxBody<Bytes, Error>>>`, but it resolves to `Result<Request<B>, Response<UnsyncBoxBody<Bytes, Error>>>`:
server/src/lib.rs#L252
error[E0271]: expected `Pin<Box<dyn Future<Output = Result<Request<B>, Response<UnsyncBoxBody<Bytes, Error>>>> + Send>>` to be a future that resolves to `Result<Request<B>, Response<UnsyncBoxBody<Bytes, Error>>>`, but it resolves to `Result<Request<B>, Response<UnsyncBoxBody<Bytes, Error>>>`
--> server/src/middleware/session.rs:252:19
|
252 | type Future = BoxFuture<'static, Result<Request<B>, Response<Self::ResponseBody>>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `http::request::Request<B>`, found `axum::http::Request<B>`
|
= note: `axum::http::Request<B>` and `http::request::Request<B>` have similar names, but are actually distinct types
note: `axum::http::Request<B>` is defined in crate `http`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-0.2.9/src/request.rs:157:1
|
157 | pub struct Request<T> {
| ^^^^^^^^^^^^^^^^^^^^^
note: `http::request::Request<B>` is defined in crate `http`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-1.0.0/src/request.rs:158:1
|
158 | pub struct Request<T> {
| ^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `http` are being used?
note: required by a bound in `tower_http::auth::AsyncAuthorizeRequest::Future`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-http-0.5.0/src/auth/async_require_authorization.rs:285:25
|
285 | type Future: Future<Output = Result<Request<Self::RequestBody>, Response<Self::ResponseBody>>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AsyncAuthorizeRequest::Future`
|
method `authorize` has an incompatible type for trait:
server/src/lib.rs#L254
error[E0053]: method `authorize` has an incompatible type for trait
--> server/src/middleware/session.rs:254:38
|
254 | fn authorize(&mut self, mut req: Request<B>) -> Self::Future {
| ^^^^^^^^^^
| |
| expected `http::request::Request<B>`, found `axum::http::Request<B>`
| help: change the parameter type to match the trait: `http::request::Request<B>`
|
= note: expected signature `fn(&mut middleware::session::SessionAuth, http::request::Request<B>) -> std::pin::Pin<_>`
found signature `fn(&mut middleware::session::SessionAuth, axum::http::Request<B>) -> std::pin::Pin<_>`
|
the trait bound `tower_http::auth::AsyncRequireAuthorization<axum::handler::HandlerService<fn(axum::extract::State<server::Server>, axum::Extension<middleware::session::Session>, axum::extract::Path<i64>, extract::Json<charted_common::models::payloads::PatchRepositoryPayload>) -> impl futures_util::Future<Output = std::result::Result<models::res::ApiResponse, models::res::ApiResponse>> {routing::v1::repository::PatchRepositoryRestController::run}, (axum_core::extract::private::ViaRequest, axum::extract::State<server::Server>, axum::Extension<middleware::session::Session>, axum::extract::Path<i64>, extract::Json<charted_common::models::payloads::PatchRepositoryPayload>), _, _>, middleware::session::SessionAuth>: tower::Service<axum::http::Request<_>>` is not satisfied:
server/src/lib.rs#L43
error[E0277]: the trait bound `tower_http::auth::AsyncRequireAuthorization<axum::handler::HandlerService<fn(axum::extract::State<server::Server>, axum::Extension<middleware::session::Session>, axum::extract::Path<i64>, extract::Json<charted_common::models::payloads::PatchRepositoryPayload>) -> impl futures_util::Future<Output = std::result::Result<models::res::ApiResponse, models::res::ApiResponse>> {routing::v1::repository::PatchRepositoryRestController::run}, (axum_core::extract::private::ViaRequest, axum::extract::State<server::Server>, axum::Extension<middleware::session::Session>, axum::extract::Path<i64>, extract::Json<charted_common::models::payloads::PatchRepositoryPayload>), _, _>, middleware::session::SessionAuth>: tower::Service<axum::http::Request<_>>` is not satisfied
--> server/src/routing/v1/repository/mod.rs:43:54
|
43 | PatchRepositoryRestController::run.layer(AsyncRequireAuthorizationLayer::new(
| ________________________________________________-----_^
| | |
| | required by a bound introduced by this call
44 | | SessionAuth::default().scope(ApiKeyScope::RepoUpdate),
45 | | )),
| |_____________^ the trait `tower::Service<axum::http::Request<_>>` is not implemented for `tower_http::auth::AsyncRequireAuthorization<axum::handler::HandlerService<fn(axum::extract::State<server::Server>, axum::Extension<middleware::session::Session>, axum::extract::Path<i64>, extract::Json<charted_common::models::payloads::PatchRepositoryPayload>) -> impl futures_util::Future<Output = std::result::Result<models::res::ApiResponse, models::res::ApiResponse>> {routing::v1::repository::PatchRepositoryRestController::run}, (axum_core::extract::private::ViaRequest, axum::extract::State<server::Server>, axum::Extension<middleware::session::Session>, axum::extract::Path<i64>, extract::Json<charted_common::models::payloads::PatchRepositoryPayload>), _, _>, middleware::session::SessionAuth>`
|
= help: the trait `tower::Service<http::request::Request<ReqBody>>` is implemented for `tower_http::auth::AsyncRequireAuthorization<S, Auth>`
note: required by a bound in `axum::handler::Handler::layer`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/axum-0.6.20/src/handler/mod.rs:183:21
|
180 | fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>
| ----- required by a bound in this associated function
...
183 | L::Service: Service<Request<NewReqBody>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Handler::layer`
|
Rust CI (Linux (x86_64))
Process completed with exit code 1.
|
Rust CI (macOS (x86_64))
The job was canceled because "ubuntu-latest" failed.
|
useless conversion to the same type: `i64`:
crates/sessions/src/lib.rs#L372
warning: useless conversion to the same type: `i64`
--> crates/sessions/src/manager.rs:372:17
|
372 | one_week.timestamp_millis().try_into().unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider removing `.try_into()`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
1 warning emitted
warning: 1 warning emitted
|