Use .is_some() not Some(_)

This commit is contained in:
Takayuki Nakata 2020-07-14 08:08:13 +09:00
parent f2419b9d62
commit b4091032ab

View File

@ -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,