diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-05-17 22:55:31 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-17 22:55:31 +0200 |
| commit | c975d0d5e989cca6eff8e80ca8174f85eb4a3460 (patch) | |
| tree | 7aaf68ee71d81a1d71d7dcb1f928659bc6fa975d /src/layout/shaping.rs | |
| parent | 24c4a746bc68874f2d1b0d1b726596930acaadcf (diff) | |
Tidy up layouting code
Diffstat (limited to 'src/layout/shaping.rs')
| -rw-r--r-- | src/layout/shaping.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/layout/shaping.rs b/src/layout/shaping.rs index 8a407260..dd6c55bd 100644 --- a/src/layout/shaping.rs +++ b/src/layout/shaping.rs @@ -336,9 +336,8 @@ fn measure( let mut top = Length::ZERO; let mut bottom = Length::ZERO; let mut expand_vertical = |face: &Face| { - top = top.max(face.vertical_metric(props.top_edge).to_length(props.size)); - bottom = - bottom.max(-face.vertical_metric(props.bottom_edge).to_length(props.size)); + top.set_max(face.vertical_metric(props.top_edge).to_length(props.size)); + bottom.set_max(-face.vertical_metric(props.bottom_edge).to_length(props.size)); }; if glyphs.is_empty() { |
