1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 10:27:42 +02:00

lint and readme cleanup (#97)

This commit is contained in:
Rob Ede
2020-09-12 00:52:55 +01:00
committed by GitHub
parent 4a546718aa
commit 7a26d99c1a
9 changed files with 56 additions and 74 deletions

View File

@ -5,7 +5,7 @@
## 0.3.0 - 2020-09-11
* Update `actix-web` dependency to 3.0.0.
* Minimum supported Rust version(MSRV) is now 1.42.0.
* Minimum supported Rust version (MSRV) is now 1.42.0.
* Implement the Debug trait on all public types.

View File

@ -590,7 +590,7 @@ impl Inner {
AllOrSome::Some(ref allowed_origins) => allowed_origins
.get(origin)
.map(|_| ())
.ok_or_else(|| CorsError::OriginNotAllowed),
.ok_or(CorsError::OriginNotAllowed),
};
}
Err(CorsError::BadOrigin)
@ -638,7 +638,7 @@ impl Inner {
.methods
.get(&method)
.map(|_| ())
.ok_or_else(|| CorsError::MethodNotAllowed);
.ok_or(CorsError::MethodNotAllowed);
}
}
Err(CorsError::BadRequestMethod)
@ -1072,6 +1072,7 @@ mod tests {
.collect::<Vec<&str>>();
for h in exposed_headers {
#[allow(clippy::needless_collect)]
assert!(headers.contains(&h.as_str()));
}
}