]> git.lizzy.rs Git - rust.git/commit
Auto merge of #5597 - esamudera:slice_iter_next, r=flip1995
authorbors <bors@rust-lang.org>
Tue, 2 Jun 2020 11:42:22 +0000 (11:42 +0000)
committerbors <bors@rust-lang.org>
Tue, 2 Jun 2020 11:42:22 +0000 (11:42 +0000)
commitf760d77bdb2bff46f284500f77ecc697dd8507c5
tree165f0ef977d0ad29157d774e6456a06e2e6aedc6
parentbfafb8e0d61fd55bf72e11babefee76d17006367
parent32fde0b5116b3a1115d11c49a9bf2af2ebdd5773
Auto merge of #5597 - esamudera:slice_iter_next, r=flip1995

New lint: iter_next_slice

Hello, this is a work-in-progress PR for issue: https://github.com/rust-lang/rust-clippy/issues/5572

I have implemented lint to replace `iter().next()` for `slice[index..]` and `array` with `get(index)` and `get(0)` respectively. However since I made a lot of changes, I would like to request some feedback before continuing so that I could fix mistakes.

Thank you!

---

changelog: implement `iter_next_slice` lint and test, and modify `needless_continues`, `for_loop_over_options_result` UI tests since they have `iter().next()`
CHANGELOG.md
clippy_lints/src/lib.rs
clippy_lints/src/methods/mod.rs
src/lintlist/mod.rs