Ignore str::len() in or_fun_call lint.

This commit is contained in:
Jamie Quigley 2021-03-22 19:34:20 +00:00
parent aca95aac7b
commit 45e775697e
No known key found for this signature in database
GPG key ID: 8E8FF66E2AE8D970
4 changed files with 10 additions and 4 deletions

View file

@ -91,7 +91,7 @@ pub(super) fn check<'tcx>(
let ty = cx.typeck_results().expr_ty(&args[0]).peel_refs();
match ty.kind() {
ty::Slice(_) | ty::Array(_, _) => return,
ty::Slice(_) | ty::Array(_, _) | ty::Str => return,
_ => (),
}