From: asonix Date: Mon, 20 Apr 2020 04:43:30 +0000 (-0500) Subject: appease clippy X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%22%7Burl%7D/%7Bthis.imageSrc%7D?a=commitdiff_plain;h=4712ae4eb0160a36d27f531cf940de98c5f695a0;p=lemmy.git appease clippy --- 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)