]> git.lizzy.rs Git - rust.git/commit
Auto merge of #8862 - Alexendoo:get-last-with-len, r=Jarcho,xFrednet
authorbors <bors@rust-lang.org>
Tue, 24 May 2022 21:40:15 +0000 (21:40 +0000)
committerbors <bors@rust-lang.org>
Tue, 24 May 2022 21:40:15 +0000 (21:40 +0000)
commitb97784fd07b1981292703fb136cf6e4f7cddc113
tree3f0a1a88c178ccb1b08534fb1df2f7a90d1db510
parent67a089134de7ecad7b8f55af10a6d0c76f9b6146
parent855849034c15330f146376ae7073c38cbacb00b2
Auto merge of #8862 - Alexendoo:get-last-with-len, r=Jarcho,xFrednet

`get_last_with_len`: lint `VecDeque` and any deref to slice

changelog: [`get_last_with_len`]: lint `VecDeque` and any deref to slice

Previously only `Vec`s were linted, this will now catch any usages on slices, arrays, etc. It also suggests `.back()` for `VecDeque`s

Also moves the lint into `methods/`
clippy_lints/src/lib.register_all.rs
clippy_lints/src/lib.register_lints.rs
clippy_lints/src/methods/mod.rs