~vpzom/hitide

802f8597fcf5d9981e716db7e10fdc3cfa166b6b — Colin Reeder 13 days ago 6c235c5
rustfmt
2 files changed, 5 insertions(+), 2 deletions(-)

M src/routes/mod.rs
M src/util.rs
M src/routes/mod.rs => src/routes/mod.rs +2 -1
@@ 35,7 35,8 @@ fn get_cookie_map(src: Option<&str>) -> Result<CookieMap, ginger::ParseError> {
        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>(

M src/util.rs => src/util.rs +3 -1
@@ 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)
}