Use method syntax

This commit is contained in:
MoskalykA 2024-10-07 18:44:24 +02:00 committed by Laurențiu Nicola
parent 510090f774
commit f719ee7fc2
2 changed files with 2 additions and 2 deletions

View file

@ -287,7 +287,7 @@ pub(crate) fn const_eval_discriminant_variant(
}
let repr = db.enum_data(loc.parent).repr;
let is_signed = Option::is_none_or(repr.and_then(|repr| repr.int), |int| int.is_signed());
let is_signed = repr.and_then(|repr| repr.int).is_none_or(|int| int.is_signed());
let mir_body = db.monomorphized_mir_body(
def,

View file

@ -65,7 +65,7 @@ pub(crate) fn complete_mod(
.iter()
.filter(|&submodule_candidate_file| submodule_candidate_file != module_definition_file)
.filter(|&submodule_candidate_file| {
Option::is_none_or(module_declaration_file, |it| it != submodule_candidate_file)
module_declaration_file.is_none_or(|it| it != submodule_candidate_file)
})
.filter_map(|submodule_file| {
let submodule_path = source_root.path_for_file(&submodule_file)?;