From c02037628e36e71e528b3c76ffb88dc103d73228 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 6 Dec 2021 20:49:58 +0300 Subject: Make rustfmt and clippy happy --- src/frontend/mod.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/frontend/mod.rs') diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 76114c5..c0452f3 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -33,11 +33,14 @@ struct FrontendError { code: StatusCode, } impl FrontendError { - pub fn with_code(code: C, msg: &str) -> Self where C: TryInto { + pub fn with_code(code: C, msg: &str) -> Self + where + C: TryInto, + { Self { msg: msg.to_string(), source: None, - code: code.try_into().unwrap_or_else(|_| StatusCode::InternalServerError), + code: code.try_into().unwrap_or(StatusCode::InternalServerError), } } pub fn msg(&self) -> &str { @@ -188,7 +191,7 @@ pub async fn onboarding_receiver(mut req: Request Result { let authorization_endpoint = request.state().authorization_endpoint.to_string(); let token_endpoint = request.state().token_endpoint.to_string(); - let owner = request.url().origin().ascii_serialization().clone() + "/"; + let owner = request.url().origin().ascii_serialization() + "/"; let site_name = &request .state() .storage -- cgit 1.4.1