1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-23 21:51:06 +01:00

address msrv todo in router

This commit is contained in:
Rob Ede 2021-04-16 02:06:11 +01:00
parent aeb81ad3fd
commit 7749dfe46a
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
4 changed files with 4 additions and 7 deletions

View File

@ -7,7 +7,7 @@
//! [`Sink`]: futures_sink::Sink //! [`Sink`]: futures_sink::Sink
//! [`Stream`]: futures_core::Stream //! [`Stream`]: futures_core::Stream
#![deny(rust_2018_idioms, nonstandard_style)] #![deny(rust_2018_idioms, nonstandard_style, future_incompatible)]
#![warn(missing_docs)] #![warn(missing_docs)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

View File

@ -581,10 +581,7 @@ impl ResourceDef {
mut for_prefix: bool, mut for_prefix: bool,
) -> (String, Vec<PatternElement>, bool, usize) { ) -> (String, Vec<PatternElement>, bool, usize) {
if pattern.find('{').is_none() { if pattern.find('{').is_none() {
// TODO: MSRV: 1.45 return if let Some(path) = pattern.strip_suffix('*') {
#[allow(clippy::manual_strip)]
return if pattern.ends_with('*') {
let path = &pattern[..pattern.len() - 1];
let re = String::from("^") + path + "(.*)"; let re = String::from("^") + path + "(.*)";
(re, vec![PatternElement::Str(String::from(path))], true, 0) (re, vec![PatternElement::Str(String::from(path))], true, 0)
} else { } else {

View File

@ -1,7 +1,7 @@
//! See [`Service`] docs for information on this crate's foundational trait. //! See [`Service`] docs for information on this crate's foundational trait.
#![no_std] #![no_std]
#![deny(rust_2018_idioms, nonstandard_style)] #![deny(rust_2018_idioms, nonstandard_style, future_incompatible)]
#![warn(missing_docs)] #![warn(missing_docs)]
#![allow(clippy::type_complexity)] #![allow(clippy::type_complexity)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]

View File

@ -56,7 +56,7 @@ pub enum Resolver {
/// An interface for custom async DNS resolvers. /// An interface for custom async DNS resolvers.
/// ///
/// # Usage /// # Usage
/// ```rust /// ```
/// use std::net::SocketAddr; /// use std::net::SocketAddr;
/// ///
/// use actix_tls::connect::{Resolve, Resolver}; /// use actix_tls::connect::{Resolve, Resolver};