mirror of https://github.com/tokio-rs/axum
Resolve clippies (#2843)
This commit is contained in:
parent
37e4574012
commit
50274725cb
|
@ -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]
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue