~vpzom/lotide

[PATCH 3/4] Cleanup: Use method chaining instead of wrapping in Ok()

Details
Message ID
<20210108190903.28930-4-mail@beyermatthias.de>
DKIM signature
missing
Download raw message
Patch: +3 -3
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
---
 src/routes/mod.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/routes/mod.rs b/src/routes/mod.rs
index bd22bf5..33b9d09 100644
--- a/src/routes/mod.rs
+++ b/src/routes/mod.rs
@@ -52,10 +52,10 @@ fn get_cookie_map_for_headers(headers: &hyper::HeaderMap) -> Result<CookieMap, c
}

fn get_cookies_string(headers: &hyper::HeaderMap) -> Result<Option<&str>, crate::Error> {
    Ok(headers
        .get(hyper::header::COOKIE)
    headers.get(hyper::header::COOKIE)
        .map(|x| x.to_str())
        .transpose()?)
        .transpose()
        .map_err(crate::Error::from)
}

fn for_client(
-- 
2.29.2
Reply to thread Export thread (mbox)