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:
@ -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.
|
||||
|
||||
|
||||
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user