Commit Graph

9 Commits

Author SHA1 Message Date
Guillaume Gomez
cc915cced8 Add missing ui annotations to new ui tests 2025-02-15 13:44:26 +01:00
Guillaume Gomez
1f94d55a18 Fix new tests updates 2025-02-15 13:38:42 +01:00
Guillaume Gomez
f666fd6417 Update UI tests 2025-02-15 13:38:16 +01:00
Samuel Tardieu
f826193aec unnecessary_map_or: do not consume the non-Copy comparison value 2025-02-13 12:00:38 +01:00
Samuel Tardieu
27592e3ec8 Make unnecessary_map_or work with ref and Deref
Receivers which are references to `Option` and `Result`, or who
implement `Deref` to one of those types, will be linted as well.
2025-01-19 10:06:21 +01:00
Samuel Tardieu
9c46e1173f Remove unneeded parentheses in unnecessary_map_or lint output
When the expression is transformed into an equality, parentheses are
needed only if the resulting equality is used:

- as a receiver in a method call
- as part of a binary or unary expression
- as part of a cast

In other cases, which will be the majority, no parentheses are required.
This makes the lint suggestions cleaner.
2025-01-03 00:32:46 +01:00
Samuel Tardieu
de03a05bc8 unnecessary_map_or: lint .map_or(true, …) as well 2024-11-16 00:12:41 +01:00
Samuel Tardieu
d1688b53f1 unnecessary_map_or: add non-comparaison tests 2024-11-15 23:56:19 +01:00
Jacherr
89210d7c5a new lint unnecessary_map_or 2024-11-12 23:00:26 +00:00