From 4712ae4eb0160a36d27f531cf940de98c5f695a0 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 19 Apr 2020 23:43:30 -0500 Subject: [PATCH] appease clippy --- server/src/rate_limit/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/rate_limit/mod.rs b/server/src/rate_limit/mod.rs index 646e3477..9aeb1171 100644 --- a/server/src/rate_limit/mod.rs +++ b/server/src/rate_limit/mod.rs @@ -54,7 +54,7 @@ impl RateLimited { { let rate_limit: RateLimitConfig = actix_web::web::block(move || { // needs to be in a web::block because the RwLock in settings is from stdlib - Ok(Settings::get().rate_limit.clone()) as Result<_, failure::Error> + Ok(Settings::get().rate_limit) as Result<_, failure::Error> }) .await .map_err(|e| match e { @@ -150,6 +150,8 @@ where } } +type FutResult = dyn Future>; + impl Service for RateLimitedMiddleware where S: Service, @@ -158,7 +160,7 @@ where type Request = S::Request; type Response = S::Response; type Error = actix_web::Error; - type Future = Pin>>>; + type Future = Pin>>; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { self.1.poll_ready(cx)