Use .is_some()
not Some(_)
This commit is contained in:
parent
f2419b9d62
commit
b4091032ab
@ -55,7 +55,7 @@ fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'tcx Expr<'_>) {
|
||||
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…
Reference in New Issue
Block a user