Skip to content

Commit

Permalink
Fix clippy::needless_lifetimes lints (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Dec 2, 2024
1 parent 3b3fae6 commit e21313b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/angle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl std::str::FromStr for Angle {
}
}

impl<'a> Stream<'a> {
impl Stream<'_> {
/// Parses angle from the stream.
///
/// <https://www.w3.org/TR/SVG2/types.html#InterfaceSVGAngle>
Expand Down
2 changes: 1 addition & 1 deletion src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl std::str::FromStr for Color {
}
}

impl<'a> Stream<'a> {
impl Stream<'_> {
/// Tries to parse a color, but doesn't advance on error.
pub fn try_parse_color(&mut self) -> Option<Color> {
let mut s = *self;
Expand Down
2 changes: 1 addition & 1 deletion src/directional_position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl std::str::FromStr for DirectionalPosition {
}
}

impl<'a> Stream<'a> {
impl Stream<'_> {
/// Parses a directional position [`left`, `center`, `right`, `bottom`, `top`] from the stream.
pub fn parse_directional_position(&mut self) -> Result<DirectionalPosition, Error> {
self.skip_spaces();
Expand Down
2 changes: 1 addition & 1 deletion src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Display for FontFamily {
}
}

impl<'a> Stream<'a> {
impl Stream<'_> {
pub fn parse_font_families(&mut self) -> Result<Vec<FontFamily>, Error> {
let mut families = vec![];

Expand Down
4 changes: 2 additions & 2 deletions src/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl std::str::FromStr for Length {
}
}

impl<'a> Stream<'a> {
impl Stream<'_> {
/// Parses length from the stream.
///
/// <https://www.w3.org/TR/SVG2/types.html#InterfaceSVGLength>
Expand Down Expand Up @@ -166,7 +166,7 @@ impl<'a> From<&'a str> for LengthListParser<'a> {
}
}

impl<'a> Iterator for LengthListParser<'a> {
impl Iterator for LengthListParser<'_> {
type Item = Result<Length, Error>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
4 changes: 2 additions & 2 deletions src/number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl std::str::FromStr for Number {
}
}

impl<'a> Stream<'a> {
impl Stream<'_> {
/// Parses number from the stream.
///
/// This method will detect a number length and then
Expand Down Expand Up @@ -145,7 +145,7 @@ impl<'a> From<&'a str> for NumberListParser<'a> {
}
}

impl<'a> Iterator for NumberListParser<'a> {
impl Iterator for NumberListParser<'_> {
type Item = Result<f64, Error>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
4 changes: 2 additions & 2 deletions src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl<'a> From<&'a str> for PathParser<'a> {
}
}

impl<'a> Iterator for PathParser<'a> {
impl Iterator for PathParser<'_> {
type Item = Result<PathSegment, Error>;

#[inline]
Expand Down Expand Up @@ -661,7 +661,7 @@ impl<'a> From<&'a str> for SimplifyingPathParser<'a> {
}
}

impl<'a> Iterator for SimplifyingPathParser<'a> {
impl Iterator for SimplifyingPathParser<'_> {
type Item = Result<SimplePathSegment, Error>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion src/points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<'a> From<&'a str> for PointsParser<'a> {
}
}

impl<'a> Iterator for PointsParser<'a> {
impl Iterator for PointsParser<'_> {
type Item = (f64, f64);

fn next(&mut self) -> Option<Self::Item> {
Expand Down
4 changes: 2 additions & 2 deletions src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl<'a> From<&'a str> for TransformListParser<'a> {
}
}

impl<'a> Iterator for TransformListParser<'a> {
impl Iterator for TransformListParser<'_> {
type Item = Result<TransformListToken, Error>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -137,7 +137,7 @@ impl<'a> Iterator for TransformListParser<'a> {
}
}

impl<'a> TransformListParser<'a> {
impl TransformListParser<'_> {
fn parse_next(&mut self) -> Result<TransformListToken, Error> {
let s = &mut self.stream;

Expand Down

0 comments on commit e21313b

Please sign in to comment.