Skip to content

Commit

Permalink
Resolve clippies (#2843)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatchan authored Jul 23, 2024
1 parent 37e4574 commit 5027472
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 23 deletions.
1 change: 1 addition & 0 deletions axum-core/src/ext_traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ mod tests {
}

// some extractor that requires the state, such as `SignedCookieJar`
#[allow(dead_code)]
pub(crate) struct RequiresState(pub(crate) String);

#[async_trait]
Expand Down
1 change: 0 additions & 1 deletion axum-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
clippy::needless_borrow,
clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock,
clippy::match_on_vec_items,
clippy::imprecise_flops,
Expand Down
2 changes: 1 addition & 1 deletion axum-extra/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ http-body-util = "0.1.0"
mime = "0.3"
pin-project-lite = "0.2"
serde = "1.0"
tower = { version = "0.4", default_features = false, features = ["util"] }
tower = { version = "0.4", default-features = false, features = ["util"] }
tower-layer = "0.3"
tower-service = "0.3"

Expand Down
1 change: 0 additions & 1 deletion axum-extra/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
clippy::needless_borrow,
clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock,
clippy::match_on_vec_items,
clippy::imprecise_flops,
Expand Down
1 change: 0 additions & 1 deletion axum-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
clippy::needless_borrow,
clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock,
clippy::match_on_vec_items,
clippy::imprecise_flops,
Expand Down
1 change: 0 additions & 1 deletion axum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@
clippy::needless_borrow,
clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock,
clippy::match_on_vec_items,
clippy::imprecise_flops,
Expand Down
17 changes: 0 additions & 17 deletions axum/src/routing/tests/handle_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,6 @@ fn timeout() -> TimeoutLayer {
TimeoutLayer::new(Duration::from_millis(10))
}

#[derive(Clone)]
struct Svc;

impl<R> Service<R> for Svc {
type Response = Response<Body>;
type Error = hyper::Error;
type Future = Ready<Result<Self::Response, Self::Error>>;

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}

fn call(&mut self, _req: R) -> Self::Future {
ready(Ok(Response::new(Body::empty())))
}
}

#[crate::test]
async fn handler() {
let app = Router::new().route(
Expand Down
2 changes: 1 addition & 1 deletion examples/sse/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ mod tests {
let listening_url = spawn_app("127.0.0.1").await;

let mut event_stream = reqwest::Client::new()
.get(&format!("{}/sse", listening_url))
.get(format!("{}/sse", listening_url))
.header("User-Agent", "integration_test")
.send()
.await
Expand Down

0 comments on commit 5027472

Please sign in to comment.