diff options
| author | Takayuki Nakata <f.seasons017@gmail.com> | 2020-07-14 08:08:13 +0900 |
|---|---|---|
| committer | Takayuki Nakata <f.seasons017@gmail.com> | 2020-07-14 08:08:13 +0900 |
| commit | b4091032abbadf586ea8c77bc547ec2ac403ef0a (patch) | |
| tree | a08e72e504902c1213061b144382821983285775 | |
| parent | f2419b9d6299fb07a1163b47dc273f64e0444a6c (diff) | |
| download | rust-b4091032abbadf586ea8c77bc547ec2ac403ef0a.tar.gz rust-b4091032abbadf586ea8c77bc547ec2ac403ef0a.zip | |
Use `.is_some()` not `Some(_)`
| -rw-r--r-- | clippy_lints/src/repeat_once.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/repeat_once.rs b/clippy_lints/src/repeat_once.rs index 3a0b3b1c257..a3af369e41e 100644 --- a/clippy_lints/src/repeat_once.rs +++ b/clippy_lints/src/repeat_once.rs @@ -55,7 +55,7 @@ impl<'tcx> LateLintPass<'tcx> for RepeatOnce { format!("{}.to_string()", snippet(cx, args[0].span, r#""...""#)), Applicability::MachineApplicable, ); - } else if let Some(_) = ty.builtin_index() { + } else if ty.builtin_index().is_some() { span_lint_and_sugg( cx, REPEAT_ONCE, |
