1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 00:44:26 +02:00

bump msrv to 1.51

This commit is contained in:
Rob Ede
2021-08-30 23:19:03 +01:00
parent 168b2f227d
commit 5128b1bdfc
26 changed files with 43 additions and 30 deletions

View File

@ -53,7 +53,7 @@
//! * SSL support using OpenSSL or Rustls
//! * Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
//! * Includes an async [HTTP client](https://docs.rs/awc/)
//! * Runs on stable Rust 1.46+
//! * Runs on stable Rust 1.51+
//!
//! # Crate Features
//! * `cookies` - cookies support (enabled by default)

View File

@ -270,7 +270,7 @@ pub(crate) mod tests {
impl BodyTest for Body {
fn bin_ref(&self) -> &[u8] {
match self {
Body::Bytes(ref bin) => &bin,
Body::Bytes(ref bin) => bin,
_ => unreachable!("bug in test impl"),
}
}
@ -283,11 +283,11 @@ pub(crate) mod tests {
fn bin_ref(&self) -> &[u8] {
match self {
ResponseBody::Body(ref b) => match b {
Body::Bytes(ref bin) => &bin,
Body::Bytes(ref bin) => bin,
_ => unreachable!("bug in test impl"),
},
ResponseBody::Other(ref b) => match b {
Body::Bytes(ref bin) => &bin,
Body::Bytes(ref bin) => bin,
_ => unreachable!("bug in test impl"),
},
}

View File

@ -213,10 +213,10 @@ mod tests {
#[actix_rt::test]
async fn test_service_request_extract() {
let req = TestRequest::with_uri("/name/user1/").to_srv_request();
assert!(Query::<Id>::from_query(&req.query_string()).is_err());
assert!(Query::<Id>::from_query(req.query_string()).is_err());
let req = TestRequest::with_uri("/name/user1/?id=test").to_srv_request();
let mut s = Query::<Id>::from_query(&req.query_string()).unwrap();
let mut s = Query::<Id>::from_query(req.query_string()).unwrap();
assert_eq!(s.id, "test");
assert_eq!(