Skip to content

Commit

Permalink
clippy: Fix semicolon_if_nothing_returned lints. (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored May 17, 2024
1 parent a4da8d5 commit ff6181b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/text/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,31 @@ impl VelloFont {
let height = (metrics.cap_height.unwrap_or(line_height) + pen_y) as f64;
match alignment {
VelloTextAlignment::TopLeft => {
transform *= vello::kurbo::Affine::translate((0.0, height))
transform *= vello::kurbo::Affine::translate((0.0, height));
}
VelloTextAlignment::Left => {
transform *= vello::kurbo::Affine::translate((0.0, height / 2.0))
transform *= vello::kurbo::Affine::translate((0.0, height / 2.0));
}
VelloTextAlignment::BottomLeft => {
transform *= vello::kurbo::Affine::translate((0.0, 0.0))
transform *= vello::kurbo::Affine::translate((0.0, 0.0));
}
VelloTextAlignment::Top => {
transform *= vello::kurbo::Affine::translate((-width / 2.0, height))
transform *= vello::kurbo::Affine::translate((-width / 2.0, height));
}
VelloTextAlignment::Center => {
transform *= vello::kurbo::Affine::translate((-width / 2.0, height / 2.0))
transform *= vello::kurbo::Affine::translate((-width / 2.0, height / 2.0));
}
VelloTextAlignment::Bottom => {
transform *= vello::kurbo::Affine::translate((-width / 2.0, 0.0))
transform *= vello::kurbo::Affine::translate((-width / 2.0, 0.0));
}
VelloTextAlignment::TopRight => {
transform *= vello::kurbo::Affine::translate((-width, height))
transform *= vello::kurbo::Affine::translate((-width, height));
}
VelloTextAlignment::Right => {
transform *= vello::kurbo::Affine::translate((-width, height / 2.0))
transform *= vello::kurbo::Affine::translate((-width, height / 2.0));
}
VelloTextAlignment::BottomRight => {
transform *= vello::kurbo::Affine::translate((-width, 0.0))
transform *= vello::kurbo::Affine::translate((-width, 0.0));
}
}

Expand Down

0 comments on commit ff6181b

Please sign in to comment.