1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 08:57:00 +02:00

clippy fmt

This commit is contained in:
Nikolay Kim
2018-08-23 09:48:01 -07:00
parent e9c139bdea
commit 1716380f08
41 changed files with 616 additions and 617 deletions

View File

@@ -93,8 +93,7 @@ fn origin(headers: &HeaderMap) -> Option<Result<Cow<str>, CsrfError>> {
.to_str()
.map_err(|_| CsrfError::BadOrigin)
.map(|o| o.into())
})
.or_else(|| {
}).or_else(|| {
headers.get(header::REFERER).map(|referer| {
Uri::try_from(Bytes::from(referer.as_bytes()))
.ok()
@@ -251,7 +250,7 @@ mod tests {
"Referer",
"https://www.example.com/some/path?query=param",
).method(Method::POST)
.finish();
.finish();
assert!(csrf.start(&req).is_ok());
}