diff --git a/gazebo/src/ext/str.rs b/gazebo/src/ext/str.rs index 1408830..466694a 100644 --- a/gazebo/src/ext/str.rs +++ b/gazebo/src/ext/str.rs @@ -28,7 +28,7 @@ pub trait StrExt { #[cfg(feature = "str_pattern_extensions")] fn split1<'a, P>(&'a self, pat: P) -> (&'a Self, &'a Self) where - P: Pattern<'a>; + P: Pattern; /// Like `split`, but only separates off the first element if there is a /// separator, otherwise returns `None`. For example: @@ -48,7 +48,7 @@ pub trait StrExt { #[deprecated(since = "0.6.1", note = "use `split_once` available in `std`")] fn split1_opt<'a, P>(&'a self, pat: P) -> Option<(&'a Self, &'a Self)> where - P: Pattern<'a>; + P: Pattern; /// Trim off the first match, or return the string unchanged if the pattern /// is not a prefix of the string. Like 'trim_start_matches', but at @@ -63,7 +63,7 @@ pub trait StrExt { #[cfg(feature = "str_pattern_extensions")] fn trim_start_match<'a, P>(&'a self, pat: P) -> &'a Self where - P: Pattern<'a>; + P: Pattern; /// Trim off the first match and return 'Some', or return 'None' if the /// pattern is not a prefix of the string. Like 'trim_start_matches'. @@ -79,7 +79,7 @@ pub trait StrExt { #[deprecated(note = "Use str.strip_prefix instead")] fn trim_start_match_opt<'a, P>(&'a self, pat: P) -> Option<&'a Self> where - P: Pattern<'a>; + P: Pattern; /// Trim off the first match, or return the string unchanged if the pattern /// is not a prefix of the string. Like 'trim_start_matches', but at @@ -94,7 +94,7 @@ pub trait StrExt { #[cfg(feature = "str_pattern_extensions")] fn trim_end_match<'a, P>(&'a self, pat: P) -> &'a Self where - P: Pattern<'a, Searcher: ReverseSearcher<'a>>; + P: Pattern: ReverseSearcher<'a>>; /// Trim off the first match and return 'Some', or return 'None' if the /// pattern is not a prefix of the string. Like 'trim_start_matches'. @@ -110,14 +110,14 @@ pub trait StrExt { #[deprecated(note = "Use str.strip_suffix instead")] fn trim_end_match_opt<'a, P>(&'a self, pat: P) -> Option<&'a Self> where - P: Pattern<'a, Searcher: ReverseSearcher<'a>>; + P: Pattern: ReverseSearcher<'a>>; } impl StrExt for str { #[cfg(feature = "str_pattern_extensions")] fn split1_opt<'a, P>(&'a self, pat: P) -> Option<(&'a Self, &'a Self)> where - P: Pattern<'a>, + P: Pattern, { self.split_once(pat) } @@ -125,7 +125,7 @@ impl StrExt for str { #[cfg(feature = "str_pattern_extensions")] fn split1<'a, P>(&'a self, pat: P) -> (&'a Self, &'a Self) where - P: Pattern<'a>, + P: Pattern, { self.split_once(pat).unwrap_or((self, "")) } @@ -133,7 +133,7 @@ impl StrExt for str { #[cfg(feature = "str_pattern_extensions")] fn trim_start_match_opt<'a, P>(&'a self, pat: P) -> Option<&'a Self> where - P: Pattern<'a>, + P: Pattern, { let mut matcher = pat.into_searcher(self); match matcher.next() { @@ -145,7 +145,7 @@ impl StrExt for str { #[cfg(feature = "str_pattern_extensions")] fn trim_start_match<'a, P>(&'a self, pat: P) -> &'a Self where - P: Pattern<'a>, + P: Pattern, { #[allow(deprecated)] self.trim_start_match_opt(pat).unwrap_or(self) @@ -154,7 +154,7 @@ impl StrExt for str { #[cfg(feature = "str_pattern_extensions")] fn trim_end_match_opt<'a, P>(&'a self, pat: P) -> Option<&'a Self> where - P: Pattern<'a, Searcher: ReverseSearcher<'a>>, + P: Pattern: ReverseSearcher<'a>>, { let mut matcher = pat.into_searcher(self); match matcher.next_back() { @@ -166,7 +166,7 @@ impl StrExt for str { #[cfg(feature = "str_pattern_extensions")] fn trim_end_match<'a, P>(&'a self, pat: P) -> &'a Self where - P: Pattern<'a, Searcher: ReverseSearcher<'a>>, + P: Pattern: ReverseSearcher<'a>>, { #[allow(deprecated)] self.trim_end_match_opt(pat).unwrap_or(self) diff --git a/gazebo/src/lib.rs b/gazebo/src/lib.rs index 46368d4..626ca4e 100644 --- a/gazebo/src/lib.rs +++ b/gazebo/src/lib.rs @@ -8,6 +8,7 @@ */ #![cfg_attr(feature = "str_pattern_extensions", feature(pattern))] +#![allow(clippy::too_long_first_doc_paragraph)] //! A collection of well-tested primitives that have been useful. Most modules stand alone.