Resolve clippies (#2843)

This commit is contained in:
Benno van den Berg 2024-07-24 00:07:25 +02:00 committed by GitHub
parent 37e4574012
commit 50274725cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 3 additions and 23 deletions

View file

@ -30,6 +30,7 @@ mod tests {
} }
// some extractor that requires the state, such as `SignedCookieJar` // some extractor that requires the state, such as `SignedCookieJar`
#[allow(dead_code)]
pub(crate) struct RequiresState(pub(crate) String); pub(crate) struct RequiresState(pub(crate) String);
#[async_trait] #[async_trait]

View file

@ -21,7 +21,6 @@
clippy::needless_borrow, clippy::needless_borrow,
clippy::match_wildcard_for_single_variants, clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex, clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock, clippy::await_holding_lock,
clippy::match_on_vec_items, clippy::match_on_vec_items,
clippy::imprecise_flops, clippy::imprecise_flops,

View file

@ -49,7 +49,7 @@ http-body-util = "0.1.0"
mime = "0.3" mime = "0.3"
pin-project-lite = "0.2" pin-project-lite = "0.2"
serde = "1.0" 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-layer = "0.3"
tower-service = "0.3" tower-service = "0.3"

View file

@ -40,7 +40,6 @@
clippy::needless_borrow, clippy::needless_borrow,
clippy::match_wildcard_for_single_variants, clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex, clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock, clippy::await_holding_lock,
clippy::match_on_vec_items, clippy::match_on_vec_items,
clippy::imprecise_flops, clippy::imprecise_flops,

View file

@ -15,7 +15,6 @@
clippy::needless_borrow, clippy::needless_borrow,
clippy::match_wildcard_for_single_variants, clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex, clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock, clippy::await_holding_lock,
clippy::match_on_vec_items, clippy::match_on_vec_items,
clippy::imprecise_flops, clippy::imprecise_flops,

View file

@ -388,7 +388,6 @@
clippy::needless_borrow, clippy::needless_borrow,
clippy::match_wildcard_for_single_variants, clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex, clippy::if_let_mutex,
clippy::mismatched_target_os,
clippy::await_holding_lock, clippy::await_holding_lock,
clippy::match_on_vec_items, clippy::match_on_vec_items,
clippy::imprecise_flops, clippy::imprecise_flops,

View file

@ -12,23 +12,6 @@ fn timeout() -> TimeoutLayer {
TimeoutLayer::new(Duration::from_millis(10)) 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] #[crate::test]
async fn handler() { async fn handler() {
let app = Router::new().route( let app = Router::new().route(

View file

@ -96,7 +96,7 @@ mod tests {
let listening_url = spawn_app("127.0.0.1").await; let listening_url = spawn_app("127.0.0.1").await;
let mut event_stream = reqwest::Client::new() let mut event_stream = reqwest::Client::new()
.get(&format!("{}/sse", listening_url)) .get(format!("{}/sse", listening_url))
.header("User-Agent", "integration_test") .header("User-Agent", "integration_test")
.send() .send()
.await .await