diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f296d5708..8e3c56c29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: target: - { name: Linux, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu } version: - - 1.46.0 # MSRV + - 1.51.0 # MSRV - stable - nightly @@ -108,7 +108,7 @@ jobs: - { name: macOS, os: macos-latest, triple: x86_64-apple-darwin } - { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc } version: - - 1.46.0 # MSRV + - 1.51.0 # MSRV - stable - nightly diff --git a/actix-cors/CHANGES.md b/actix-cors/CHANGES.md index a2f9352a4..d75ba99fe 100644 --- a/actix-cors/CHANGES.md +++ b/actix-cors/CHANGES.md @@ -1,6 +1,7 @@ # Changes ## Unreleased - 2021-xx-xx +* Minimum supported Rust version (MSRV) is now 1.51. ## 0.6.0-beta.2 - 2021-06-27 diff --git a/actix-cors/README.md b/actix-cors/README.md index f4337188f..d6dd10920 100644 --- a/actix-cors/README.md +++ b/actix-cors/README.md @@ -11,4 +11,4 @@ - [API Documentation](https://docs.rs/actix-cors) - [Example Project](https://github.com/actix/examples/tree/master/security/web-cors) -- Minimum Supported Rust Version (MSRV): 1.46.0 +- Minimum Supported Rust Version (MSRV): 1.51 diff --git a/actix-identity/CHANGES.md b/actix-identity/CHANGES.md index 53ae4d4ef..3bbca7fc8 100644 --- a/actix-identity/CHANGES.md +++ b/actix-identity/CHANGES.md @@ -1,6 +1,7 @@ # Changes ## Unreleased - 2020-xx-xx +* Minimum supported Rust version (MSRV) is now 1.51. ## 0.4.0-beta.2 - 2020-06-27 diff --git a/actix-identity/README.md b/actix-identity/README.md index 281111b1d..746a3bbf2 100644 --- a/actix-identity/README.md +++ b/actix-identity/README.md @@ -10,4 +10,4 @@ ## Documentation & community resources * [API Documentation](https://docs.rs/actix-identity) -* Minimum Supported Rust Version (MSRV): 1.46 +* Minimum Supported Rust Version (MSRV): 1.51 diff --git a/actix-identity/src/cookie.rs b/actix-identity/src/cookie.rs index 02a1e1438..e056f205d 100644 --- a/actix-identity/src/cookie.rs +++ b/actix-identity/src/cookie.rs @@ -109,10 +109,10 @@ impl CookieIdentityInner { }; if add_cookie { - jar.private_mut(&key).add(cookie); + jar.private_mut(key).add(cookie); } else { jar.add_original(cookie.clone()); - jar.private_mut(&key).remove(cookie); + jar.private_mut(key).remove(cookie); } for cookie in jar.delta() { diff --git a/actix-protobuf/CHANGES.md b/actix-protobuf/CHANGES.md index d9b5386e6..1a5c003a6 100644 --- a/actix-protobuf/CHANGES.md +++ b/actix-protobuf/CHANGES.md @@ -1,6 +1,7 @@ # Changes ## Unreleased - 2020-xx-xx +* Minimum supported Rust version (MSRV) is now 1.51. ## 0.7.0-beta.1 - 2020-06-27 diff --git a/actix-protobuf/README.md b/actix-protobuf/README.md index 3bba256cd..9a22a4006 100644 --- a/actix-protobuf/README.md +++ b/actix-protobuf/README.md @@ -11,7 +11,7 @@ - [API Documentation](https://docs.rs/actix-protobuf) - [Example Project](https://github.com/actix/examples/tree/master/other/protobuf) -- Minimum Supported Rust Version (MSRV): 1.46.0 +- Minimum Supported Rust Version (MSRV): 1.51 ## Example diff --git a/actix-redis/CHANGES.md b/actix-redis/CHANGES.md index 8472aeee6..13210c3f1 100644 --- a/actix-redis/CHANGES.md +++ b/actix-redis/CHANGES.md @@ -1,6 +1,7 @@ # Changes ## Unreleased - 2020-xx-xx +* Minimum supported Rust version (MSRV) is now 1.51. ## 0.10.0-beta.2 - 2020-06-27 diff --git a/actix-redis/README.md b/actix-redis/README.md index f5bc0838e..dd5748094 100644 --- a/actix-redis/README.md +++ b/actix-redis/README.md @@ -11,7 +11,7 @@ - [API Documentation](https://docs.rs/actix-redis) - [Example Project](https://github.com/actix/examples/tree/HEAD/session/redis-session) -- Minimum Supported Rust Version (MSRV): 1.46 +- Minimum Supported Rust Version (MSRV): 1.51 ## Redis Session Backend diff --git a/actix-redis/src/session.rs b/actix-redis/src/session.rs index 8a68490d0..0145c98bf 100644 --- a/actix-redis/src/session.rs +++ b/actix-redis/src/session.rs @@ -241,7 +241,7 @@ impl Inner { if let Some(cookie) = jar.signed(&self.key).get(&self.name) { let value = cookie.value().to_owned(); - let cache_key = (self.cache_keygen)(&cookie.value()); + let cache_key = (self.cache_keygen)(cookie.value()); (value, cache_key) } else { return Ok(None); diff --git a/actix-session/CHANGES.md b/actix-session/CHANGES.md index 750c2a720..dae19b7cc 100644 --- a/actix-session/CHANGES.md +++ b/actix-session/CHANGES.md @@ -1,6 +1,7 @@ # Changes ## Unreleased - 2020-xx-xx +* Minimum supported Rust version (MSRV) is now 1.51. ## 0.5.0-beta.2 - 2020-06-27 diff --git a/actix-session/README.md b/actix-session/README.md index 3cb88b703..e9ec1b940 100644 --- a/actix-session/README.md +++ b/actix-session/README.md @@ -12,4 +12,4 @@ - [API Documentation](https://docs.rs/actix-session) - [Example Projects](https://github.com/actix/examples/tree/HEAD/session) -- Minimum Supported Rust Version (MSRV): 1.46 +- Minimum Supported Rust Version (MSRV): 1.51 diff --git a/actix-session/src/lib.rs b/actix-session/src/lib.rs index db500003a..e848b6bd8 100644 --- a/actix-session/src/lib.rs +++ b/actix-session/src/lib.rs @@ -286,7 +286,7 @@ impl Session { fn get_session(extensions: &mut Extensions) -> Session { if let Some(s_impl) = extensions.get::>>() { - return Session(Rc::clone(&s_impl)); + return Session(Rc::clone(s_impl)); } let inner = Rc::new(RefCell::new(SessionInner::default())); extensions.insert(inner.clone()); diff --git a/actix-web-httpauth/CHANGES.md b/actix-web-httpauth/CHANGES.md index 486005e44..5ab05bf2f 100644 --- a/actix-web-httpauth/CHANGES.md +++ b/actix-web-httpauth/CHANGES.md @@ -1,6 +1,7 @@ # Changes ## Unreleased - 2020-xx-xx +* Minimum supported Rust version (MSRV) is now 1.51. ## 0.6.0-beta.2 - 2020-06-27 diff --git a/actix-web-httpauth/README.md b/actix-web-httpauth/README.md index 662600c86..50fe04055 100644 --- a/actix-web-httpauth/README.md +++ b/actix-web-httpauth/README.md @@ -10,7 +10,7 @@ ## Documentation & Resources - [API Documentation](*https://docs.rs/actix-web-httpauth/) -- Minimum Supported Rust Version (MSRV): 1.46 +- Minimum Supported Rust Version (MSRV): 1.51 ## Features - Typed [Authorization] and [WWW-Authenticate] headers diff --git a/actix-web-httpauth/src/extractors/basic.rs b/actix-web-httpauth/src/extractors/basic.rs index 0f6654603..84d0be138 100644 --- a/actix-web-httpauth/src/extractors/basic.rs +++ b/actix-web-httpauth/src/extractors/basic.rs @@ -94,7 +94,7 @@ pub struct BasicAuth(Basic); impl BasicAuth { /// Returns client's user-ID. pub fn user_id(&self) -> &Cow<'static, str> { - &self.0.user_id() + self.0.user_id() } /// Returns client's password. diff --git a/actix-web-httpauth/src/lib.rs b/actix-web-httpauth/src/lib.rs index 9bd27d603..f61ac50cd 100644 --- a/actix-web-httpauth/src/lib.rs +++ b/actix-web-httpauth/src/lib.rs @@ -15,8 +15,8 @@ //! [Extractors]: https://actix.rs/docs/extractors/ //! [Middleware]: ./middleware +#![forbid(unsafe_code)] #![deny(missing_docs, nonstandard_style, rust_2018_idioms)] -#![deny(clippy::all)] pub mod extractors; pub mod headers; diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 000000000..829dd1c59 --- /dev/null +++ b/clippy.toml @@ -0,0 +1 @@ +msrv = "1.51" diff --git a/rustfmt.toml b/rustfmt.toml index 94bd11d51..44148a2d3 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,2 +1 @@ -max_width = 89 reorder_imports = true