diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-12 18:24:31 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-12 18:24:31 +0200 |
| commit | 4c37ebb936ae49278a5f299c815a37b2ae32cdc3 (patch) | |
| tree | 533bc71c1f454fc25cb1df7001197244a106f856 /tests | |
| parent | fec1f41106862617797abf65d4eba8061cf4497b (diff) | |
Give up on not implementing Eq and Ord
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typeset.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index 90fc6005..420df09c 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -350,12 +350,7 @@ fn draw(cache: &Cache, frames: &[Frame], dpi: f32) -> Pixmap { let pad = Length::pt(5.0); let height = pad + frames.iter().map(|l| l.size.height + pad).sum::<Length>(); - let width = 2.0 * pad - + frames - .iter() - .map(|l| l.size.width) - .max_by(|a, b| a.partial_cmp(&b).unwrap()) - .unwrap_or_default(); + let width = 2.0 * pad + frames.iter().map(|l| l.size.width).max().unwrap_or_default(); let pixel_width = (dpi * width.to_pt() as f32) as u32; let pixel_height = (dpi * height.to_pt() as f32) as u32; |
