From c9a2b3c681115817e002c5636d08f58d74a7ac09 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Fri, 18 Oct 2024 22:41:36 +0100 Subject: [PATCH] Made clippy happy, again --- benches/cbor.rs | 6 +-- benches/json.rs | 10 ++-- examples/logos.rs | 2 +- examples/nano_rust.rs | 6 +-- src/blanket.rs | 4 +- src/combinator.rs | 27 +++++++---- src/container.rs | 106 +++++++++++++++++++++++++++--------------- src/error.rs | 20 ++++---- src/input.rs | 21 +++++---- src/lib.rs | 7 ++- src/primitive.rs | 2 +- src/recursive.rs | 4 +- src/util.rs | 4 +- 13 files changed, 130 insertions(+), 89 deletions(-) diff --git a/benches/cbor.rs b/benches/cbor.rs index d1d71f1d..fb4bf4ae 100644 --- a/benches/cbor.rs +++ b/benches/cbor.rs @@ -299,7 +299,7 @@ mod nom { Ok((i, CborZero::Tag(tag, Box::new(value)))) } - fn float_simple<'a>(i: &'a [u8]) -> IResult<&[u8], CborZero<'a>> { + fn float_simple(i: &[u8]) -> IResult<&[u8], CborZero<'_>> { bits(preceded( tag(7, 3usize), alt(( @@ -311,13 +311,13 @@ mod nom { // preceded(tag(25, 5usize), map(be_f16, |v| CborZero::HalfFloat(v))), preceded( tag(26, 5usize), - map(bytes(be_f32::<_, nom::error::Error<&'a [u8]>>), |v| { + map(bytes(be_f32::<_, nom::error::Error<&[u8]>>), |v| { CborZero::SingleFloat(v) }), ), preceded( tag(27, 5usize), - map(bytes(be_f64::<_, nom::error::Error<&'a [u8]>>), |v| { + map(bytes(be_f64::<_, nom::error::Error<&[u8]>>), |v| { CborZero::DoubleFloat(v) }), ), diff --git a/benches/json.rs b/benches/json.rs index c1f7632a..36f2762e 100644 --- a/benches/json.rs +++ b/benches/json.rs @@ -296,7 +296,7 @@ mod nom { )(i) } - fn array<'a, E: ParseError<&'a [u8]>>(i: &'a [u8]) -> IResult<&'a [u8], Vec, E> { + fn array<'a, E: ParseError<&'a [u8]>>(i: &'a [u8]) -> IResult<&'a [u8], Vec>, E> { preceded( char('['), cut(terminated( @@ -308,7 +308,7 @@ mod nom { fn member<'a, E: ParseError<&'a [u8]>>( i: &'a [u8], - ) -> IResult<&'a [u8], (&'a [u8], JsonZero), E> { + ) -> IResult<&'a [u8], (&'a [u8], JsonZero<'a>), E> { separated_pair( preceded(space, string), cut(preceded(space, char(':'))), @@ -318,7 +318,7 @@ mod nom { fn object<'a, E: ParseError<&'a [u8]>>( i: &'a [u8], - ) -> IResult<&'a [u8], Vec<(&'a [u8], JsonZero)>, E> { + ) -> IResult<&'a [u8], Vec<(&'a [u8], JsonZero<'a>)>, E> { preceded( char('{'), cut(terminated( @@ -328,7 +328,7 @@ mod nom { )(i) } - fn value<'a, E: ParseError<&'a [u8]>>(i: &'a [u8]) -> IResult<&'a [u8], JsonZero, E> { + fn value<'a, E: ParseError<&'a [u8]>>(i: &'a [u8]) -> IResult<&'a [u8], JsonZero<'a>, E> { preceded( space, alt(( @@ -343,7 +343,7 @@ mod nom { )(i) } - fn root<'a, E: ParseError<&'a [u8]>>(i: &'a [u8]) -> IResult<&'a [u8], JsonZero, E> { + fn root<'a, E: ParseError<&'a [u8]>>(i: &'a [u8]) -> IResult<&'a [u8], JsonZero<'a>, E> { terminated(value, space)(i) } diff --git a/examples/logos.rs b/examples/logos.rs index 72631a00..ddee727c 100644 --- a/examples/logos.rs +++ b/examples/logos.rs @@ -35,7 +35,7 @@ enum Token<'a> { Whitespace, } -impl<'a> fmt::Display for Token<'a> { +impl fmt::Display for Token<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Self::Float(s) => write!(f, "{}", s), diff --git a/examples/nano_rust.rs b/examples/nano_rust.rs index eadf3683..1ef88c7a 100644 --- a/examples/nano_rust.rs +++ b/examples/nano_rust.rs @@ -25,7 +25,7 @@ enum Token<'src> { Else, } -impl<'src> fmt::Display for Token<'src> { +impl fmt::Display for Token<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Token::Null => write!(f, "null"), @@ -110,7 +110,7 @@ enum Value<'src> { Func(&'src str), } -impl<'src> Value<'src> { +impl Value<'_> { fn num(self, span: Span) -> Result { if let Value::Num(x) = self { Ok(x) @@ -123,7 +123,7 @@ impl<'src> Value<'src> { } } -impl<'src> std::fmt::Display for Value<'src> { +impl std::fmt::Display for Value<'_> { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Null => write!(f, "null"), diff --git a/src/blanket.rs b/src/blanket.rs index d72b9c2a..9e6c2594 100644 --- a/src/blanket.rs +++ b/src/blanket.rs @@ -1,6 +1,6 @@ use super::*; -impl<'a, 'b, T, I, O, E> ParserSealed<'a, I, O, E> for &'b T +impl<'a, T, I, O, E> ParserSealed<'a, I, O, E> for &T where T: ?Sized + Parser<'a, I, O, E>, I: Input<'a>, @@ -16,7 +16,7 @@ where go_extra!(O); } -impl<'a, 'b, T, I, O, E> ConfigParserSealed<'a, I, O, E> for &'b T +impl<'a, T, I, O, E> ConfigParserSealed<'a, I, O, E> for &T where T: ?Sized + ConfigParser<'a, I, O, E>, I: Input<'a>, diff --git a/src/combinator.rs b/src/combinator.rs index 21a0eacc..c92bbcd5 100644 --- a/src/combinator.rs +++ b/src/combinator.rs @@ -85,7 +85,8 @@ where I: Input<'a>, E: ParserExtra<'a, I>, { - type IterState = (A::IterState, A::Config) + type IterState + = (A::IterState, A::Config) where I: 'a; @@ -158,7 +159,8 @@ where I: Input<'a>, E: ParserExtra<'a, I>, { - type IterState = (A::IterState, A::Config) + type IterState + = (A::IterState, A::Config) where I: 'a; @@ -304,7 +306,8 @@ where A: IterParser<'a, I, OA, E>, F: Fn(OA) -> O, { - type IterState = A::IterState + type IterState + = A::IterState where I: 'a; @@ -375,7 +378,8 @@ where A: IterParser<'a, I, OA, E>, F: Fn(OA, &mut MapExtra<'a, '_, I, E>) -> O, { - type IterState = A::IterState + type IterState + = A::IterState where I: 'a; @@ -453,7 +457,8 @@ where F: Fn, OA: Tuple, { - type IterState = A::IterState + type IterState + = A::IterState where I: 'a; @@ -1040,7 +1045,8 @@ where B: IterParser<'a, I, OB, extra::Full>, OA: 'a, { - type IterState = (OA, B::IterState) + type IterState + = (OA, B::IterState) where I: 'a; @@ -1113,7 +1119,8 @@ where B: IterParser<'a, I, OB, extra::Full>, OA: 'a, { - type IterState = (OA, B::IterState) + type IterState + = (OA, B::IterState) where I: 'a; @@ -1734,7 +1741,8 @@ where A: Parser<'a, I, OA, E>, B: Parser<'a, I, OB, E>, { - type IterState = usize + type IterState + = usize where I: 'a; @@ -1863,7 +1871,8 @@ where I: Input<'a>, E: ParserExtra<'a, I>, { - type IterState = (usize, A::IterState) + type IterState + = (usize, A::IterState) where I: 'a; diff --git a/src/container.rs b/src/container.rs index 82495373..9104c2a2 100644 --- a/src/container.rs +++ b/src/container.rs @@ -299,11 +299,13 @@ pub trait Seq<'p, T> { } impl<'p, T: Clone> Seq<'p, T> for T { - type Item<'a> = &'a T + type Item<'a> + = &'a T where Self: 'a; - type Iter<'a> = core::iter::Once<&'a T> + type Iter<'a> + = core::iter::Once<&'a T> where Self: 'a; @@ -330,11 +332,13 @@ impl<'p, T: Clone> Seq<'p, T> for T { } impl<'p, T> Seq<'p, T> for &'p T { - type Item<'a> = &'p T + type Item<'a> + = &'p T where Self: 'a; - type Iter<'a> = core::iter::Once<&'p T> + type Iter<'a> + = core::iter::Once<&'p T> where Self: 'a; @@ -361,11 +365,13 @@ impl<'p, T> Seq<'p, T> for &'p T { } impl<'p, T> Seq<'p, T> for &'p [T] { - type Item<'a> = &'p T + type Item<'a> + = &'p T where Self: 'a; - type Iter<'a> = core::slice::Iter<'p, T> + type Iter<'a> + = core::slice::Iter<'p, T> where Self: 'a; @@ -392,11 +398,13 @@ impl<'p, T> Seq<'p, T> for &'p [T] { } impl<'p, T: Clone, const N: usize> Seq<'p, T> for [T; N] { - type Item<'a> = &'a T + type Item<'a> + = &'a T where Self: 'a; - type Iter<'a> = core::slice::Iter<'a, T> + type Iter<'a> + = core::slice::Iter<'a, T> where Self: 'a; @@ -423,11 +431,13 @@ impl<'p, T: Clone, const N: usize> Seq<'p, T> for [T; N] { } impl<'p, T, const N: usize> Seq<'p, T> for &'p [T; N] { - type Item<'a> = &'p T + type Item<'a> + = &'p T where Self: 'a; - type Iter<'a> = core::slice::Iter<'p, T> + type Iter<'a> + = core::slice::Iter<'p, T> where Self: 'a; @@ -455,11 +465,13 @@ impl<'p, T, const N: usize> Seq<'p, T> for &'p [T; N] { } impl<'p, T: Clone> Seq<'p, T> for Vec { - type Item<'a> = &'a T + type Item<'a> + = &'a T where Self: 'a; - type Iter<'a> = core::slice::Iter<'a, T> + type Iter<'a> + = core::slice::Iter<'a, T> where Self: 'a; @@ -486,11 +498,13 @@ impl<'p, T: Clone> Seq<'p, T> for Vec { } impl<'p, T: Clone> Seq<'p, T> for LinkedList { - type Item<'a> = &'a T + type Item<'a> + = &'a T where Self: 'a; - type Iter<'a> = alloc::collections::linked_list::Iter<'a, T> + type Iter<'a> + = alloc::collections::linked_list::Iter<'a, T> where Self: 'a; @@ -517,11 +531,13 @@ impl<'p, T: Clone> Seq<'p, T> for LinkedList { } impl<'p, T: Clone + Eq + Hash> Seq<'p, T> for HashSet { - type Item<'a> = &'a T + type Item<'a> + = &'a T where Self: 'a; - type Iter<'a> = hashbrown::hash_set::Iter<'a, T> + type Iter<'a> + = hashbrown::hash_set::Iter<'a, T> where Self: 'a; @@ -549,11 +565,13 @@ impl<'p, T: Clone + Eq + Hash> Seq<'p, T> for HashSet { #[cfg(feature = "std")] impl<'p, T: Clone + Eq + Hash> Seq<'p, T> for std::collections::HashSet { - type Item<'a> = &'a T + type Item<'a> + = &'a T where Self: 'a; - type Iter<'a> = std::collections::hash_set::Iter<'a, T> + type Iter<'a> + = std::collections::hash_set::Iter<'a, T> where Self: 'a; @@ -580,11 +598,13 @@ impl<'p, T: Clone + Eq + Hash> Seq<'p, T> for std::collections::HashSet { } impl<'p, T: Clone + Ord> Seq<'p, T> for alloc::collections::BTreeSet { - type Item<'a> = &'a T + type Item<'a> + = &'a T where Self: 'a; - type Iter<'a> = alloc::collections::btree_set::Iter<'a, T> + type Iter<'a> + = alloc::collections::btree_set::Iter<'a, T> where Self: 'a; @@ -615,11 +635,13 @@ where T: Clone + PartialOrd, // Explicit declaration of an implied truth - `Step` requires these Self: Iterator, { - type Item<'a> = T + type Item<'a> + = T where Self: 'a; - type Iter<'a> = Range + type Iter<'a> + = Range where Self: 'a; @@ -647,11 +669,13 @@ where T: Clone + PartialOrd, Self: Iterator, { - type Item<'a> = T + type Item<'a> + = T where Self: 'a; - type Iter<'a> = core::ops::RangeInclusive + type Iter<'a> + = core::ops::RangeInclusive where Self: 'a; @@ -679,11 +703,13 @@ where T: Clone + PartialOrd, Self: Iterator, { - type Item<'a> = T + type Item<'a> + = T where Self: 'a; - type Iter<'a> = RangeFrom + type Iter<'a> + = RangeFrom where Self: 'a; @@ -707,11 +733,13 @@ where } impl<'p> Seq<'p, char> for str { - type Item<'a> = char + type Item<'a> + = char where Self: 'a; - type Iter<'a> = core::str::Chars<'a> + type Iter<'a> + = core::str::Chars<'a> where Self: 'a; @@ -735,11 +763,13 @@ impl<'p> Seq<'p, char> for str { } impl<'p> Seq<'p, char> for &'p str { - type Item<'a> = char + type Item<'a> + = char where Self: 'a; - type Iter<'a> = core::str::Chars<'a> + type Iter<'a> + = core::str::Chars<'a> where Self: 'a; @@ -763,11 +793,13 @@ impl<'p> Seq<'p, char> for &'p str { } impl<'p> Seq<'p, char> for String { - type Item<'a> = char + type Item<'a> + = char where Self: 'a; - type Iter<'a> = core::str::Chars<'a> + type Iter<'a> + = core::str::Chars<'a> where Self: 'a; @@ -795,19 +827,19 @@ impl<'p> Seq<'p, char> for String { /// This trait is likely to change in future versions of the crate, so avoid implementing it yourself. pub trait OrderedSeq<'p, T>: Seq<'p, T> {} -impl<'p, T: Clone> OrderedSeq<'p, T> for T {} +impl OrderedSeq<'_, T> for T {} impl<'p, T> OrderedSeq<'p, T> for &'p T {} impl<'p, T> OrderedSeq<'p, T> for &'p [T] {} -impl<'p, T: Clone, const N: usize> OrderedSeq<'p, T> for [T; N] {} +impl OrderedSeq<'_, T> for [T; N] {} impl<'p, T, const N: usize> OrderedSeq<'p, T> for &'p [T; N] {} -impl<'p, T: Clone> OrderedSeq<'p, T> for Vec {} +impl OrderedSeq<'_, T> for Vec {} impl<'p, T> OrderedSeq<'p, T> for Range where Self: Seq<'p, T> {} impl<'p, T> OrderedSeq<'p, T> for core::ops::RangeInclusive where Self: Seq<'p, T> {} impl<'p, T> OrderedSeq<'p, T> for RangeFrom where Self: Seq<'p, T> {} -impl<'p> OrderedSeq<'p, char> for str {} +impl OrderedSeq<'_, char> for str {} impl<'p> OrderedSeq<'p, char> for &'p str {} -impl<'p> OrderedSeq<'p, char> for String {} +impl OrderedSeq<'_, char> for String {} #[cfg(test)] mod test { diff --git a/src/error.rs b/src/error.rs index 666336cb..5db7f3d5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -186,7 +186,7 @@ pub struct Simple<'a, T, S = SimpleSpan> { found: Option>, } -impl<'a, T, S> Simple<'a, T, S> { +impl Simple<'_, T, S> { /// Get the span than that error related to. pub fn span(&self) -> &S { &self.span @@ -225,7 +225,7 @@ impl<'a, I: Input<'a>> Error<'a, I> for Simple<'a, I::Token, I::Span> { } } -impl<'a, T, S> fmt::Debug for Simple<'a, T, S> +impl fmt::Debug for Simple<'_, T, S> where T: fmt::Debug, S: fmt::Debug, @@ -238,7 +238,7 @@ where } } -impl<'a, T, S> fmt::Display for Simple<'a, T, S> +impl fmt::Display for Simple<'_, T, S> where T: fmt::Debug, S: fmt::Debug, @@ -306,7 +306,7 @@ impl<'a, T, L> RichPattern<'a, T, L> { } } -impl<'a, T, L> fmt::Debug for RichPattern<'a, T, L> +impl fmt::Debug for RichPattern<'_, T, L> where T: fmt::Debug, L: fmt::Debug, @@ -320,7 +320,7 @@ where } } -impl<'a, T, L> fmt::Display for RichPattern<'a, T, L> +impl fmt::Display for RichPattern<'_, T, L> where T: fmt::Display, L: fmt::Display, @@ -480,7 +480,7 @@ impl<'a, T, L> RichReason<'a, T, L> { } } -impl<'a, T, L> RichReason<'a, T, L> +impl RichReason<'_, T, L> where T: PartialEq, L: PartialEq, @@ -529,7 +529,7 @@ where } } -impl<'a, T, L> fmt::Display for RichReason<'a, T, L> +impl fmt::Display for RichReason<'_, T, L> where T: fmt::Display, L: fmt::Display, @@ -559,7 +559,7 @@ pub struct Rich<'a, T, S = SimpleSpan, L = &'static str> { context: Vec<(L, S)>, } -impl<'a, T, S, L> Rich<'a, T, S, L> { +impl Rich<'_, T, S, L> { fn inner_fmt( &self, f: &mut fmt::Formatter<'_>, @@ -821,7 +821,7 @@ where } } -impl<'a, T, S, L> fmt::Debug for Rich<'a, T, S, L> +impl fmt::Debug for Rich<'_, T, S, L> where T: fmt::Debug, S: fmt::Debug, @@ -832,7 +832,7 @@ where } } -impl<'a, T, S, L> fmt::Display for Rich<'a, T, S, L> +impl fmt::Display for Rich<'_, T, S, L> where T: fmt::Display, S: fmt::Display, diff --git a/src/input.rs b/src/input.rs index 77271c0b..571f0130 100644 --- a/src/input.rs +++ b/src/input.rs @@ -190,7 +190,7 @@ pub trait BorrowInput<'a>: Input<'a> { unsafe fn next_ref(&self, offset: Self::Offset) -> (Self::Offset, Option<&'a Self::Token>); } -impl<'a> Sealed for &'a str {} +impl Sealed for &str {} impl<'a> Input<'a> for &'a str { type Offset = usize; type Token = char; @@ -266,7 +266,7 @@ impl<'a> SliceInput<'a> for &'a str { } } -impl<'a, T> Sealed for &'a [T] {} +impl Sealed for &[T] {} impl<'a, T> Input<'a> for &'a [T] { type Offset = usize; type Token = T; @@ -910,8 +910,8 @@ impl<'a, 'parse, I: Input<'a>> Marker<'a, 'parse, I> { } } -impl<'a, 'parse, I: Input<'a>> Copy for Marker<'a, 'parse, I> {} -impl<'a, 'parse, I: Input<'a>> Clone for Marker<'a, 'parse, I> { +impl<'a, I: Input<'a>> Copy for Marker<'a, '_, I> {} +impl<'a, I: Input<'a>> Clone for Marker<'a, '_, I> { #[inline(always)] fn clone(&self) -> Self { *self @@ -926,27 +926,28 @@ pub struct Offset<'a, 'parse, I: Input<'a>> { phantom: PhantomData &'parse ()>, // Invariance } -impl<'a, 'parse, I: Input<'a>> Copy for Offset<'a, 'parse, I> {} -impl<'a, 'parse, I: Input<'a>> Clone for Offset<'a, 'parse, I> { +impl<'a, I: Input<'a>> Copy for Offset<'a, '_, I> {} +impl<'a, I: Input<'a>> Clone for Offset<'a, '_, I> { #[inline(always)] fn clone(&self) -> Self { *self } } -impl<'a, 'parse, I: Input<'a>> Eq for Offset<'a, 'parse, I> {} -impl<'a, 'parse, I: Input<'a>> PartialEq for Offset<'a, 'parse, I> { +impl<'a, I: Input<'a>> Eq for Offset<'a, '_, I> {} +impl<'a, I: Input<'a>> PartialEq for Offset<'a, '_, I> { fn eq(&self, other: &Self) -> bool { self.offset == other.offset } } -impl<'a, 'parse, I: Input<'a>> PartialOrd for Offset<'a, 'parse, I> { +impl<'a, I: Input<'a>> PartialOrd for Offset<'a, '_, I> { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } -impl<'a, 'parse, I: Input<'a>> Ord for Offset<'a, 'parse, I> { + +impl<'a, I: Input<'a>> Ord for Offset<'a, '_, I> { fn cmp(&self, other: &Self) -> Ordering { self.offset.cmp(&other.offset) } diff --git a/src/lib.rs b/src/lib.rs index 451a4326..a7b2ceda 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2253,8 +2253,7 @@ pub struct ParserIter<'a, 'iter, P: IterParser<'a, I, O, E>, I: Input<'a>, O, E: } #[cfg(test)] -impl<'a, 'iter, P, I: Input<'a>, O, E: ParserExtra<'a, I>> Iterator - for ParserIter<'a, 'iter, P, I, O, E> +impl<'a, P, I: Input<'a>, O, E: ParserExtra<'a, I>> Iterator for ParserIter<'a, '_, P, I, O, E> where P: IterParser<'a, I, O, E>, { @@ -2593,7 +2592,7 @@ pub struct Boxed<'a, 'b, I: Input<'a>, O, E: ParserExtra<'a, I>> { inner: RefC>, } -impl<'a, 'b, I: Input<'a>, O, E: ParserExtra<'a, I>> Clone for Boxed<'a, 'b, I, O, E> { +impl<'a, I: Input<'a>, O, E: ParserExtra<'a, I>> Clone for Boxed<'a, '_, I, O, E> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), @@ -2601,7 +2600,7 @@ impl<'a, 'b, I: Input<'a>, O, E: ParserExtra<'a, I>> Clone for Boxed<'a, 'b, I, } } -impl<'a, 'b, I, O, E> ParserSealed<'a, I, O, E> for Boxed<'a, 'b, I, O, E> +impl<'a, I, O, E> ParserSealed<'a, I, O, E> for Boxed<'a, '_, I, O, E> where I: Input<'a>, E: ParserExtra<'a, I>, diff --git a/src/primitive.rs b/src/primitive.rs index 40851860..fc223393 100644 --- a/src/primitive.rs +++ b/src/primitive.rs @@ -926,7 +926,7 @@ macro_rules! impl_choice_for_tuple { impl_choice_for_tuple!(A_ B_ C_ D_ E_ F_ G_ H_ I_ J_ K_ L_ M_ N_ O_ P_ Q_ R_ S_ T_ U_ V_ W_ X_ Y_ Z_); -impl<'a, 'b, A, I, O, E> ParserSealed<'a, I, O, E> for Choice<&'b [A]> +impl<'a, A, I, O, E> ParserSealed<'a, I, O, E> for Choice<&[A]> where A: Parser<'a, I, O, E>, I: Input<'a>, diff --git a/src/recursive.rs b/src/recursive.rs index 6684ceaf..c47a3171 100644 --- a/src/recursive.rs +++ b/src/recursive.rs @@ -179,7 +179,7 @@ pub(crate) fn recurse R>(f: F) -> R { f() } -impl<'a, 'b, I, O, E> ParserSealed<'a, I, O, E> for Recursive> +impl<'a, I, O, E> ParserSealed<'a, I, O, E> for Recursive> where I: Input<'a>, E: ParserExtra<'a, I>, @@ -201,7 +201,7 @@ where go_extra!(O); } -impl<'a, 'b, I, O, E> ParserSealed<'a, I, O, E> for Recursive> +impl<'a, I, O, E> ParserSealed<'a, I, O, E> for Recursive> where I: Input<'a>, E: ParserExtra<'a, I>, diff --git a/src/util.rs b/src/util.rs index 2b81a329..e7ecf7c1 100644 --- a/src/util.rs +++ b/src/util.rs @@ -109,14 +109,14 @@ impl> DerefMut for Maybe { } } -impl<'a, T> From for Maybe { +impl From for Maybe { #[inline] fn from(x: T) -> Self { Self::Val(x) } } -impl<'a, T> From for Maybe { +impl From for Maybe { #[inline] fn from(x: T) -> Self { Self::Val(x)