From 949a961c19ba994c3f0846e7b54d9a55a94d7b9a Mon Sep 17 00:00:00 2001 From: Vika Date: Thu, 29 Jul 2021 18:14:30 +0300 Subject: Appease rustfmt, clippy and cargo check --- src/indieauth.rs | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'src/indieauth.rs') diff --git a/src/indieauth.rs b/src/indieauth.rs index aea7e4d..f8f862b 100644 --- a/src/indieauth.rs +++ b/src/indieauth.rs @@ -166,14 +166,23 @@ where .build()) } Some(value) => { - match (&req.state().internal_token) { - Some(token) => if token == &value.last().to_string().split(" ").skip(1).collect::() { - req.set_ext::(User::new( - "", // no user ID here - "https://kittybox.fireburn.ru/", - "update delete undelete media kittybox_internal:do_what_thou_wilt" - )); - return Ok(next.run(req).await) + match &req.state().internal_token { + Some(token) => { + if token + == &value + .last() + .to_string() + .split(' ') + .skip(1) + .collect::() + { + req.set_ext::(User::new( + "", // no user ID here + "https://kittybox.fireburn.ru/", + "update delete undelete media kittybox_internal:do_what_thou_wilt", + )); + return Ok(next.run(req).await); + } } None => {} } -- cgit 1.4.1