Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 13b6354

Browse files
committedMar 7, 2025·
Format for 2024 edition
1 parent c80d069 commit 13b6354

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed
 

‎parley/src/layout/data.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ pub(crate) struct RunData {
8787
}
8888

8989
impl RunData {
90-
pub(crate) fn unique_styles<'a, 'b, B: Brush>(&'a self, layout: &'b LayoutData<B>, mut cb: impl FnMut(&'b Style<B>)) {
90+
pub(crate) fn unique_styles<'a, 'b, B: Brush>(
91+
&'a self,
92+
layout: &'b LayoutData<B>,
93+
mut cb: impl FnMut(&'b Style<B>),
94+
) {
9195
let glyph_start = self.glyph_start;
9296
for cluster in &layout.clusters[self.cluster_range.clone()] {
9397
if cluster.glyph_len != 0xFF && cluster.has_divergent_styles() {

‎parley/src/layout/line/greedy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ impl<'a, B: Brush> BreakLines<'a, B> {
723723
}
724724

725725
line.metrics.leading =
726-
line.metrics.line_height - (line.metrics.ascent + line.metrics.descent);
726+
line.metrics.line_height - (line.metrics.ascent + line.metrics.descent);
727727

728728
// Compute
729729
let above = (line.metrics.ascent + line.metrics.leading * 0.5).round();

‎parley/src/layout/run.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
use super::{
5-
Brush, Cluster, ClusterPath, Font, Layout, LineItemData, NormalizedCoord, Range, Run, RunData, Style, Synthesis
5+
Brush, Cluster, ClusterPath, Font, Layout, LineItemData, NormalizedCoord, Range, Run, RunData,
6+
Style, Synthesis,
67
};
78

89
impl<'a, B: Brush> Run<'a, B> {

‎parley/src/resolve/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,9 @@ impl<B: Brush> ResolvedStyle<B> {
517517
strikethrough: self.strikethrough.as_layout_decoration(&self.brush),
518518
line_height: self.line_height * self.font_size,
519519
vertical_align: self.vertical_align,
520-
baseline_shift: self.baseline_shift.resolve(self.font_size, self.line_height),
520+
baseline_shift: self
521+
.baseline_shift
522+
.resolve(self.font_size, self.line_height),
521523
}
522524
}
523525
}

0 commit comments

Comments
 (0)
Please sign in to comment.