Use Option::is_some_and
and Result::is_ok_and
in the compiler
This commit is contained in:
parent
70db836922
commit
fb0f74a8c9
87 changed files with 148 additions and 158 deletions
|
@ -395,7 +395,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
|
|||
) -> String {
|
||||
let fn_sig = self.tcx.hir().get_if_local(self.def_id).and_then(hir::Node::fn_sig);
|
||||
let is_used_in_input = |def_id| {
|
||||
fn_sig.map_or(false, |fn_sig| {
|
||||
fn_sig.is_some_and(|fn_sig| {
|
||||
fn_sig.decl.inputs.iter().any(|ty| match ty.kind {
|
||||
hir::TyKind::Path(hir::QPath::Resolved(
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue