manifest.rs: fix some clippy warnings
@@ -69,12 +69,12 @@ impl AddonManifest {
// types MUST contain type_name
// and if there is id_prefixes, our id should start with at least one of them
let is_types_match = resource.types
- .as_ref().or(self.types.as_ref())
+ .as_ref().or_else(|| self.types.as_ref())
.map_or(false, |types| {
types.contains(&type_name)
});
let is_id_match = resource.id_prefixes
- .as_ref().or(self.id_prefixes.as_ref())
+ .as_ref().or_else(|| self.id_prefixes.as_ref())
.map_or(true, |prefixes| {
prefixes.iter().any(|pref| id.starts_with(pref))
});
