diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-08-21 16:38:51 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-08-21 17:30:21 +0200 |
| commit | 0dd4ae0a7ac0c247078df492469ff20b8a90c886 (patch) | |
| tree | 07a55343b9ccab3fe76b0f1b0de9d1be310d8b14 /tests | |
| parent | f38eb10c2b54bd13ccef119454839f6a66448462 (diff) | |
Prune derives
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typeset.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index 7aacf9e0..a14bafaf 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -248,8 +248,9 @@ fn test_part( error.trace.clear(); } - ref_errors.sort(); - errors.sort(); + // The comparison never fails since all spans are from the same source file. + ref_errors.sort_by(|a, b| a.span.partial_cmp(&b.span).unwrap()); + errors.sort_by(|a, b| a.span.partial_cmp(&b.span).unwrap()); if errors != ref_errors { println!(" Subtest {} does not match expected errors. ❌", i); |
