From 3a838dee74fd68ce3a821e810d1b89222417e0a5 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 7 Feb 2025 18:12:36 +0100 Subject: [PATCH] Fix `clippy::unnecessary_semicolon` lints (#270) --- examples/swash_render/src/main.rs | 4 ++-- examples/tiny_skia_render/src/main.rs | 2 +- examples/vello_editor/src/text.rs | 6 +++--- parley/src/layout/line/greedy.rs | 2 +- parley/src/shape.rs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/swash_render/src/main.rs b/examples/swash_render/src/main.rs index 8a69415b..f299e165 100644 --- a/examples/swash_render/src/main.rs +++ b/examples/swash_render/src/main.rs @@ -196,7 +196,7 @@ fn main() { } } } - }; + } } } @@ -354,5 +354,5 @@ fn render_glyph( } } } - }; + } } diff --git a/examples/tiny_skia_render/src/main.rs b/examples/tiny_skia_render/src/main.rs index 37b04d57..195160db 100644 --- a/examples/tiny_skia_render/src/main.rs +++ b/examples/tiny_skia_render/src/main.rs @@ -130,7 +130,7 @@ fn main() { pen.set_color(foreground_color); pen.fill_rect(inline_box.width, inline_box.height); } - }; + } } } diff --git a/examples/vello_editor/src/text.rs b/examples/vello_editor/src/text.rs index 40318df1..446bd283 100644 --- a/examples/vello_editor/src/text.rs +++ b/examples/vello_editor/src/text.rs @@ -164,7 +164,7 @@ impl Editor { drv.collapse_selection(); } else { drv.select_all(); - }; + } } Key::Named(NamedKey::ArrowLeft) => { if action_mod { @@ -307,7 +307,7 @@ impl Editor { 2 => drv.select_word_at_point(cursor_pos.0, cursor_pos.1), 3 => drv.select_line_at_point(cursor_pos.0, cursor_pos.1), _ => drv.move_to_point(cursor_pos.0, cursor_pos.1), - }; + } } } } @@ -369,7 +369,7 @@ impl Editor { if self.cursor_visible { if let Some(cursor) = self.editor.cursor_geometry(1.5) { scene.fill(Fill::NonZero, transform, palette::css::WHITE, None, &cursor); - }; + } } let layout = self.editor.layout(&mut self.font_cx, &mut self.layout_cx); for line in layout.lines() { diff --git a/parley/src/layout/line/greedy.rs b/parley/src/layout/line/greedy.rs index e6a2720e..fd08b04b 100644 --- a/parley/src/layout/line/greedy.rs +++ b/parley/src/layout/line/greedy.rs @@ -221,7 +221,7 @@ impl<'a, B: Brush> BreakLines<'a, B> { if try_commit_line!(BreakReason::Regular) { return self.start_new_line(); } - }; + } } } LayoutItemKind::TextRun => { diff --git a/parley/src/shape.rs b/parley/src/shape.rs index 4543ef9f..4b6a77dc 100644 --- a/parley/src/shape.rs +++ b/parley/src/shape.rs @@ -176,7 +176,7 @@ pub(crate) fn shape_text<'a, B: Brush>( current_box = inline_box_iter.next(); } else { break; - }; + } } if break_run && !text_range.is_empty() {