From 88d99ac89c978eb6cd96941ed4e8416a4b623fb9 Mon Sep 17 00:00:00 2001 From: Robert Gabriel Jakabosky Date: Sun, 6 Sep 2020 17:41:42 +0800 Subject: [PATCH] Fix clippy errors. (#187) --- actix-server/src/config.rs | 6 +++--- router/src/resource.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/actix-server/src/config.rs b/actix-server/src/config.rs index 65f19884..fda1ade9 100644 --- a/actix-server/src/config.rs +++ b/actix-server/src/config.rs @@ -151,7 +151,7 @@ impl InternalServiceFactory for ConfiguredService { )); }; } - return Ok(res); + Ok(res) } .boxed_local() } @@ -272,13 +272,13 @@ where fn new_service(&self, _: ()) -> Self::Future { let fut = self.inner.new_service(()); async move { - return match fut.await { + match fut.await { Ok(s) => Ok(Box::new(StreamService::new(s)) as BoxedServerService), Err(e) => { error!("Can not construct service: {:?}", e); Err(()) } - }; + } } .boxed_local() } diff --git a/router/src/resource.rs b/router/src/resource.rs index b8a8c4d4..9ed3ac10 100644 --- a/router/src/resource.rs +++ b/router/src/resource.rs @@ -624,7 +624,7 @@ impl ResourceDef { } if !for_prefix { - re.push_str("$"); + re.push('$'); } (re, elems, true, pattern.chars().count()) }