diff --git a/actix-codec/src/lib.rs b/actix-codec/src/lib.rs index dec30ba6..c7713bfe 100644 --- a/actix-codec/src/lib.rs +++ b/actix-codec/src/lib.rs @@ -7,7 +7,7 @@ //! [`Sink`]: futures_sink::Sink //! [`Stream`]: futures_core::Stream -#![deny(rust_2018_idioms, nonstandard_style)] +#![deny(rust_2018_idioms, nonstandard_style, future_incompatible)] #![warn(missing_docs)] #![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")] diff --git a/actix-router/src/resource.rs b/actix-router/src/resource.rs index 98b4a709..32162c53 100644 --- a/actix-router/src/resource.rs +++ b/actix-router/src/resource.rs @@ -581,10 +581,7 @@ impl ResourceDef { mut for_prefix: bool, ) -> (String, Vec, bool, usize) { if pattern.find('{').is_none() { - // TODO: MSRV: 1.45 - #[allow(clippy::manual_strip)] - return if pattern.ends_with('*') { - let path = &pattern[..pattern.len() - 1]; + return if let Some(path) = pattern.strip_suffix('*') { let re = String::from("^") + path + "(.*)"; (re, vec![PatternElement::Str(String::from(path))], true, 0) } else { diff --git a/actix-service/src/lib.rs b/actix-service/src/lib.rs index 8f839121..e26d5c62 100644 --- a/actix-service/src/lib.rs +++ b/actix-service/src/lib.rs @@ -1,7 +1,7 @@ //! See [`Service`] docs for information on this crate's foundational trait. #![no_std] -#![deny(rust_2018_idioms, nonstandard_style)] +#![deny(rust_2018_idioms, nonstandard_style, future_incompatible)] #![warn(missing_docs)] #![allow(clippy::type_complexity)] #![doc(html_logo_url = "https://actix.rs/img/logo.png")] diff --git a/actix-tls/src/connect/resolve.rs b/actix-tls/src/connect/resolve.rs index 32e442bf..0a92b9b1 100755 --- a/actix-tls/src/connect/resolve.rs +++ b/actix-tls/src/connect/resolve.rs @@ -56,7 +56,7 @@ pub enum Resolver { /// An interface for custom async DNS resolvers. /// /// # Usage -/// ```rust +/// ``` /// use std::net::SocketAddr; /// /// use actix_tls::connect::{Resolve, Resolver};