Skip to content

Commit

Permalink
Fix clippy::needless_lifetimes lints
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Oct 4, 2024
1 parent 528ba98 commit 0fc79de
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/vello_editor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct SimpleVelloApp<'s> {
editor: text::Editor,
}

impl<'s> ApplicationHandler for SimpleVelloApp<'s> {
impl ApplicationHandler for SimpleVelloApp<'_> {
fn resumed(&mut self, event_loop: &ActiveEventLoop) {
let RenderState::Suspended(cached_window) = &mut self.state else {
return;
Expand Down
4 changes: 2 additions & 2 deletions fontique/src/collection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ struct GenericFamilies<I> {
system: Option<I>,
}

impl<'a, I> Iterator for GenericFamilies<I>
impl<I> Iterator for GenericFamilies<I>
where
I: Iterator<Item = FamilyId> + 'a,
I: Iterator<Item = FamilyId>,
{
type Item = FamilyId;

Expand Down
4 changes: 2 additions & 2 deletions parley/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct RangedBuilder<'a, B: Brush> {
pub(crate) fcx: &'a mut FontContext,
}

impl<'a, B: Brush> RangedBuilder<'a, B> {
impl<B: Brush> RangedBuilder<'_, B> {
pub fn push_default(&mut self, property: &StyleProperty<B>) {
let resolved = self
.lcx
Expand Down Expand Up @@ -66,7 +66,7 @@ pub struct TreeBuilder<'a, B: Brush> {
pub(crate) fcx: &'a mut FontContext,
}

impl<'a, B: Brush> TreeBuilder<'a, B> {
impl<B: Brush> TreeBuilder<'_, B> {
pub fn push_style_span(&mut self, style: TextStyle<B>) {
let resolved = self
.lcx
Expand Down
2 changes: 1 addition & 1 deletion parley/src/layout/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ enum GlyphIter<'a> {
Slice(core::slice::Iter<'a, Glyph>),
}

impl<'a> Iterator for GlyphIter<'a> {
impl Iterator for GlyphIter<'_> {
type Item = Glyph;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion parley/src/layout/line/greedy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ impl<'a, B: Brush> BreakLines<'a, B> {
}
}

impl<'a, B: Brush> Drop for BreakLines<'a, B> {
impl<B: Brush> Drop for BreakLines<'_, B> {
fn drop(&mut self) {
// Compute the overall width and height of the entire layout
// The "width" excludes trailing whitespace. The "full_width" includes it.
Expand Down
2 changes: 1 addition & 1 deletion parley/src/layout/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct Clusters<'a, B: Brush> {
rev: bool,
}

impl<'a, B: Brush> Clone for Clusters<'a, B> {
impl<B: Brush> Clone for Clusters<'_, B> {
fn clone(&self) -> Self {
Self {
run: self.run,
Expand Down
2 changes: 1 addition & 1 deletion parley/src/shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ impl<'a, 'b, B: Brush> FontSelector<'a, 'b, B> {
}

#[cfg(feature = "std")]
impl<'a, 'b, B: Brush> partition::Selector for FontSelector<'a, 'b, B> {
impl<B: Brush> partition::Selector for FontSelector<'_, '_, B> {
type SelectedFont = SelectedFont;

fn select_font(&mut self, cluster: &mut CharCluster) -> Option<Self::SelectedFont> {
Expand Down
2 changes: 1 addition & 1 deletion parley/src/style/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub struct TextStyle<'a, B: Brush> {
pub letter_spacing: f32,
}

impl<'a, B: Brush> Default for TextStyle<'a, B> {
impl<B: Brush> Default for TextStyle<'_, B> {
fn default() -> Self {
TextStyle {
font_stack: FontStack::Source("sans-serif"),
Expand Down

0 comments on commit 0fc79de

Please sign in to comment.