1 error: this closure returns the unit type which also implements Ord
2 --> $DIR/unit_return_expecting_ord.rs:18:25
4 LL | structs.sort_by_key(|s| {
7 = note: `-D clippy::unit-return-expecting-ord` implied by `-D warnings`
8 help: probably caused by this trailing semicolon
9 --> $DIR/unit_return_expecting_ord.rs:19:24
14 error: this closure returns the unit type which also implements PartialOrd
15 --> $DIR/unit_return_expecting_ord.rs:22:30
17 LL | structs.is_sorted_by_key(|s| {
20 help: probably caused by this trailing semicolon
21 --> $DIR/unit_return_expecting_ord.rs:23:24
26 error: this closure returns the unit type which also implements PartialOrd
27 --> $DIR/unit_return_expecting_ord.rs:25:30
29 LL | structs.is_sorted_by_key(|s| {
32 error: this closure returns the unit type which also implements Ord
33 --> $DIR/unit_return_expecting_ord.rs:35:25
35 LL | structs.sort_by_key(|s| unit(s.field));
38 error: aborting due to 4 previous errors