diff options
| author | y21 <30553356+y21@users.noreply.github.com> | 2023-04-23 21:34:42 +0200 |
|---|---|---|
| committer | y21 <30553356+y21@users.noreply.github.com> | 2023-04-23 21:34:42 +0200 |
| commit | e8726b20b2a64b4553c87d02a330fd2bc62064bd (patch) | |
| tree | 3e489974bcdf9e8ddecb3afbebe5b399f9f66b37 /clippy_lints/src/indexing_slicing.rs | |
| parent | 7a870aef1a0a599378eefb5253be479b82c1cc8d (diff) | |
| download | rust-e8726b20b2a64b4553c87d02a330fd2bc62064bd.tar.gz rust-e8726b20b2a64b4553c87d02a330fd2bc62064bd.zip | |
also check for rest pat in `redundant_pattern_matching`
Diffstat (limited to 'clippy_lints/src/indexing_slicing.rs')
| -rw-r--r-- | clippy_lints/src/indexing_slicing.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/indexing_slicing.rs b/clippy_lints/src/indexing_slicing.rs index c384172fbde..924a361c0f6 100644 --- a/clippy_lints/src/indexing_slicing.rs +++ b/clippy_lints/src/indexing_slicing.rs @@ -170,7 +170,7 @@ impl<'tcx> LateLintPass<'tcx> for IndexingSlicing { return; } // Index is a constant uint. - if let Some(..) = constant(cx, cx.typeck_results(), index) { + if constant(cx, cx.typeck_results(), index).is_some() { // Let rustc's `const_err` lint handle constant `usize` indexing on arrays. return; } |
