mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 08:57:00 +02:00
clippy fmt
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user