Skip to content

Commit

Permalink
fix ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpdrsn committed Feb 28, 2023
1 parent 4f29ed7 commit f371430
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 18 deletions.
3 changes: 1 addition & 2 deletions axum-macros/tests/debug_handler/fail/extract_self_mut.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use axum::{
async_trait,
extract::FromRequest,
http::Request,
extract::{Request, FromRequest},
};
use axum_macros::debug_handler;

Expand Down
4 changes: 2 additions & 2 deletions axum-macros/tests/debug_handler/fail/extract_self_mut.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: Handlers must only take owned values
--> tests/debug_handler/fail/extract_self_mut.rs:24:22
--> tests/debug_handler/fail/extract_self_mut.rs:23:22
|
24 | async fn handler(&mut self) {}
23 | async fn handler(&mut self) {}
| ^^^^^^^^^
3 changes: 1 addition & 2 deletions axum-macros/tests/debug_handler/fail/extract_self_ref.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use axum::{
async_trait,
extract::FromRequest,
http::Request,
extract::{Request, FromRequest},
};
use axum_macros::debug_handler;

Expand Down
4 changes: 2 additions & 2 deletions axum-macros/tests/debug_handler/fail/extract_self_ref.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: Handlers must only take owned values
--> tests/debug_handler/fail/extract_self_ref.rs:24:22
--> tests/debug_handler/fail/extract_self_ref.rs:23:22
|
24 | async fn handler(&self) {}
23 | async fn handler(&self) {}
| ^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ error[E0277]: the trait bound `bool: IntoResponse` is not satisfied
(Response<()>, T1, R)
(Response<()>, T1, T2, R)
(Response<()>, T1, T2, T3, R)
and 124 others
and $N others
note: required by a bound in `__axum_macros_check_handler_into_response::{closure#0}::check`
--> tests/debug_handler/fail/wrong_return_type.rs:4:23
|
Expand Down
2 changes: 1 addition & 1 deletion axum-macros/tests/debug_handler/pass/request_last.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use axum::{body::Body, extract::Extension, http::Request};
use axum::extract::{Extension, Request};
use axum_macros::debug_handler;

#[debug_handler]
Expand Down
3 changes: 1 addition & 2 deletions axum-macros/tests/debug_handler/pass/self_receiver.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use axum::{
async_trait,
extract::FromRequest,
http::Request,
extract::{Request, FromRequest},
};
use axum_macros::debug_handler;

Expand Down
3 changes: 1 addition & 2 deletions axum-macros/tests/debug_handler/pass/set_state.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use axum_macros::debug_handler;
use axum::extract::{FromRef, FromRequest};
use axum::extract::{Request, FromRef, FromRequest};
use axum::async_trait;
use axum::http::Request;

#[debug_handler(state = AppState)]
async fn handler(_: A) {}
Expand Down
2 changes: 1 addition & 1 deletion axum-macros/tests/debug_handler/pass/state_and_body.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use axum_macros::debug_handler;
use axum::{extract::State, http::Request};
use axum::{extract::State, extract::Request};

#[debug_handler(state = AppState)]
async fn handler(_: State<AppState>, _: Request) {}
Expand Down
5 changes: 2 additions & 3 deletions axum-macros/tests/from_request/pass/override_rejection.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use axum::{
async_trait,
extract::{rejection::ExtensionRejection, FromRequest},
http::{StatusCode, Request},
extract::{Request, rejection::ExtensionRejection, FromRequest},
http::StatusCode,
response::{IntoResponse, Response},
routing::get,
body::Body,
Extension, Router,
};

Expand Down

0 comments on commit f371430

Please sign in to comment.