From 9705a17a09de1e9a7e585b6a39691b8239e3fd98 Mon Sep 17 00:00:00 2001 From: "Robert G. Jakabosky" Date: Sun, 6 Sep 2020 14:01:02 +0800 Subject: [PATCH] Fix clippy errors. --- 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()) }