From 7749dfe46a5af18122e02a7d64bf74699d080c5b Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Fri, 16 Apr 2021 02:06:11 +0100 Subject: [PATCH 1/2] address msrv todo in router --- actix-codec/src/lib.rs | 2 +- actix-router/src/resource.rs | 5 +---- actix-service/src/lib.rs | 2 +- actix-tls/src/connect/resolve.rs | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) 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}; From fdafc1dd655c43b126b2e0eb61761098240e9f44 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Fri, 16 Apr 2021 02:08:44 +0100 Subject: [PATCH 2/2] amend licences --- LICENSE-APACHE | 2 +- LICENSE-MIT | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE-APACHE b/LICENSE-APACHE index 6cdf2d16..8f5ba39b 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2017-NOW Nikolay Kim + Copyright 2017-NOW Actix Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/LICENSE-MIT b/LICENSE-MIT index 0f80296a..d559b1cd 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2017 Nikolay Kim +Copyright (c) 2017-NOW Actix Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated