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
ded9354dcf
Suggest using Vec::extend() in same_item_push
...
Using `Vec::extend(std::iter::repeat_n(item, N))` allows to use the more
natural number of elements to add `N`, as is probably done in the original
loop, instead of computing the difference between the existing number of
elements and the wanted one.
Before MSRV 1.82, the older suggestion to use `Vec::resize()` is still
issued.
2025-01-15 22:50:25 +01:00
Guillaume Gomez
a05d3a4137
Automatic generation of error annotations for ui tests
2023-08-22 17:18:11 +02:00
Samuel E. Moelius III
032f112745
Fix adjacent code
2022-08-16 18:34:51 -04:00
Max Baumann
9be3945be7
fix existing clippy tests
2022-03-30 20:12:58 +02:00
Yoshitomo Nakanishi
9f6f001988
same_item_push: Don't trigger same_item_push if the vec is used in the loop body
2021-04-02 16:28:16 +09:00
Takayuki Nakata
952c04674e
Refactoring: tests in same_item_push
2020-09-08 23:03:15 +09:00
Takayuki Nakata
2c9f82e7d2
Add some tests to same_item_push
...
Add tests in which the variable is initialized with a match expression and function call
2020-09-08 22:45:27 +09:00
Takayuki Nakata
3d30ef7818
Restrict same_item_push to suppress false positives
...
It emits a lint when the pushed item is a literal, a constant and an immutable binding that are initialized with those.
2020-09-07 23:46:43 +09:00
Takayuki Nakata
96b31a5b36
Fix FP when coercion kicks in
2020-09-06 00:02:35 +09:00
Takayuki Nakata
aa7ffa5257
Fix FP in same_item_push
...
Don't emit a lint when the pushed item doesn't have Clone trait
2020-09-01 22:39:09 +09:00
Takayuki Nakata
f98ffa271d
Fix FP for same_item_push
...
Don't emit a lint when `pushed_item` was declared as mutable variable.
2020-08-14 22:54:12 +09:00
Takayuki Nakata
b7ceb4d3d7
rustfmt
2020-08-05 23:00:03 +09:00
Takayuki Nakata
161f475100
Add test case for same_item_push
2020-08-05 22:51:38 +09:00
Takayuki Nakata
1e8ada3cab
Add lint same_item_push
2020-08-05 22:51:38 +09:00