Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

fix clippy (FaceRef is Copy)

Brandon Thomas35eb84d629ce
diff --git a/crates/compose/src/lib.rs b/crates/compose/src/lib.rs
index a58179866..2d32f955e 100644
--- a/crates/compose/src/lib.rs
+++ b/crates/compose/src/lib.rs
@@ -1060,7 +1060,7 @@ fn tab_leader(tab: &Glyph, leader: &str, x: f64, w: f64, origin: f64, out: &mut
while at + pw <= end + 0.01 && n < 2000 {
for &(gid, adv) in &glyphs {
out.push(PlacedGlyph {
- face: tab.face.clone(),
+ face: tab.face,
gid,
x: at,
y: -tab.shift + tab.dy,
@@ -1158,7 +1158,7 @@ fn place(g: &Glyph, x: f64) -> PlacedGlyph {
|| g.ch == story::RIGHT_INDENT_TAB
|| g.ch == shape::SOFT_HYPHEN);
PlacedGlyph {
- face: g.face.clone(),
+ face: g.face,
gid: g.gid,
x: x + g.dx,
y: -g.shift + g.dy,