improve grammer in comment sentence

Co-authored-by: dswij <dharmasw@outlook.com>
This commit is contained in:
Kisaragi 2023-06-16 16:39:09 +09:00 committed by GitHub
parent 73cd2cde8b
commit 73c0c14526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -916,7 +916,7 @@ impl<'a, 'tcx> Visitor<'tcx> for FindPanicUnwrap<'a, 'tcx> {
}
}
// check for `unwrap` and `expect` both `Option` and `Result`
// check for `unwrap` and `expect` for both `Option` and `Result`
if let Some(arglists) = method_chain_args(expr, &["unwrap"]).or(method_chain_args(expr, &["expect"])) {
let receiver_ty = self.typeck_results.expr_ty(arglists[0].0).peel_refs();
if is_type_diagnostic_item(self.cx, receiver_ty, sym::Option)