From 802f8597fcf5d9981e716db7e10fdc3cfa166b6b Mon Sep 17 00:00:00 2001 From: Colin Reeder Date: Fri, 8 Jan 2021 16:51:36 -0700 Subject: [PATCH] rustfmt --- src/routes/mod.rs | 3 ++- src/util.rs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 2e1d428..f093af6 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -35,7 +35,8 @@ fn get_cookie_map(src: Option<&str>) -> Result { fallible_iterator::convert(ginger::parse_cookies(s)) .map(|cookie| Ok((cookie.name, cookie))) .collect() - }).unwrap_or_else(|| Ok(Default::default())) + }) + .unwrap_or_else(|| Ok(Default::default())) } fn get_cookie_map_for_req<'a>( diff --git a/src/util.rs b/src/util.rs index 1ce5943..2f9a37d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -4,7 +4,9 @@ pub fn abbreviate_link(href: &str) -> &str { // Attempt to find the hostname from the URL href.find("://") .and_then(|idx1| { - href[(idx1 + 3)..].find('/').map(|idx2| &href[(idx1 + 3)..(idx1 + 3 + idx2)]) + href[(idx1 + 3)..] + .find('/') + .map(|idx2| &href[(idx1 + 3)..(idx1 + 3 + idx2)]) }) .unwrap_or(href) } -- 2.30.1