Skip to content

Commit 7ae5203

Browse files
Fix clippy::needless_lifetimes lints (#138)
1 parent d1c572d commit 7ae5203

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

path/src/path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ pub struct PathSegmentsIter<'a> {
265265
last_point: Point,
266266
}
267267

268-
impl<'a> PathSegmentsIter<'a> {
268+
impl PathSegmentsIter<'_> {
269269
/// Sets the auto closing mode. Off by default.
270270
///
271271
/// When enabled, emits an additional `PathSegment::Line` from the current position
@@ -331,7 +331,7 @@ impl<'a> PathSegmentsIter<'a> {
331331
}
332332
}
333333

334-
impl<'a> Iterator for PathSegmentsIter<'a> {
334+
impl Iterator for PathSegmentsIter<'_> {
335335
type Item = PathSegment;
336336

337337
fn next(&mut self) -> Option<Self::Item> {

path/src/stroker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct SwappableBuilders<'a> {
2323
outer: &'a mut PathBuilder,
2424
}
2525

26-
impl<'a> SwappableBuilders<'a> {
26+
impl SwappableBuilders<'_> {
2727
fn swap(&mut self) {
2828
// Skia swaps pointers to inner and outer builders during joining,
2929
// but not builders itself. So a simple `core::mem::swap` will produce invalid results.

src/edge_builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub struct PathEdgeIter<'a> {
269269
needs_close_line: bool,
270270
}
271271

272-
impl<'a> PathEdgeIter<'a> {
272+
impl PathEdgeIter<'_> {
273273
fn close_line(&mut self) -> Option<PathEdge> {
274274
self.needs_close_line = false;
275275

@@ -278,7 +278,7 @@ impl<'a> PathEdgeIter<'a> {
278278
}
279279
}
280280

281-
impl<'a> Iterator for PathEdgeIter<'a> {
281+
impl Iterator for PathEdgeIter<'_> {
282282
type Item = PathEdge;
283283

284284
fn next(&mut self) -> Option<Self::Item> {

src/painter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl Default for Paint<'_> {
8686
}
8787
}
8888

89-
impl<'a> Paint<'a> {
89+
impl Paint<'_> {
9090
/// Sets a paint source to a solid color.
9191
pub fn set_color(&mut self, color: Color) {
9292
self.shader = Shader::SolidColor(color);

src/pipeline/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub enum Stage {
143143

144144
pub const STAGES_COUNT: usize = Stage::GammaCompressSrgb as usize + 1;
145145

146-
impl<'a> PixmapRef<'a> {
146+
impl PixmapRef<'_> {
147147
#[inline(always)]
148148
pub(crate) fn gather(&self, index: u32x8) -> [PremultipliedColorU8; highp::STAGE_WIDTH] {
149149
let index: [u32; 8] = bytemuck::cast(index);
@@ -161,7 +161,7 @@ impl<'a> PixmapRef<'a> {
161161
}
162162
}
163163

164-
impl<'a> SubPixmapMut<'a> {
164+
impl SubPixmapMut<'_> {
165165
#[inline(always)]
166166
pub(crate) fn offset(&self, dx: usize, dy: usize) -> usize {
167167
self.real_width * dy + dx

src/pixmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ pub struct SubPixmapMut<'a> {
571571
pub real_width: usize,
572572
}
573573

574-
impl<'a> SubPixmapMut<'a> {
574+
impl SubPixmapMut<'_> {
575575
/// Returns a mutable slice of pixels.
576576
pub fn pixels_mut(&mut self) -> &mut [PremultipliedColorU8] {
577577
bytemuck::cast_slice_mut(self.data)

src/shaders/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub enum Shader<'a> {
5656
Pattern(Pattern<'a>),
5757
}
5858

59-
impl<'a> Shader<'a> {
59+
impl Shader<'_> {
6060
/// Checks if the shader is guaranteed to produce only opaque colors.
6161
pub fn is_opaque(&self) -> bool {
6262
match self {

0 commit comments

Comments
 (0)