clippy::iter_with_drain
suggests using .into_iter()
instead of .drain(..)
#6483
Labels
C-Code-Quality
A section of code that is hard to understand or change
D-Trivial
Nice and easy! A great choice to get started with Bevy
Bevy version
c019a60
What you did
Ran
cargo clippy --workspace --all-targets --all-features -- -Aclippy::type_complexity -Wclippy::nursery -Aclippy::use_self -Aclippy::missing_const_for_fn -Aclippy::redundant_pub_crate -Aclippy::cognitive_complexity -Aclippy::branches_sharing_code -Aclippy::option_if_let_else -Aclippy::useless_let_if_seq -Aclippy::equatable_if_let -Aclippy::iter_on_single_items -Aclippy::iter_on_empty_collections -Aclippy::debug_assert_with_mut_call -Aclippy::type_repetition_in_bounds -Aclippy::trait_duplication_in_bounds -Aclippy::fallible_impl_from -Aclippy::future_not_send -Aclippy::imprecise_flops -Aclippy::suboptimal_flops -Wclippy::doc_markdown -Wclippy::redundant_else -Wclippy::match_same_arms -Wclippy::semicolon_if_nothing_returned -Wclippy::explicit_iter_loop -Wclippy::map_flatten -Dwarnings
What went wrong
Additional information
The documentation for this lint includes: "
.into_iter()
is simpler with better performance."The text was updated successfully, but these errors were encountered: