Use .is_some() not Some(_)
This commit is contained in:
parent
f2419b9d62
commit
b4091032ab
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue