some code style on is_supported
@@ -68,10 +68,14 @@ impl AddonManifest {
// 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())
- .map_or(false, |types| types.contains(&type_name));
+ .map_or(false, |types| {
+ types.contains(&type_name)
+ });
let is_id_match = resource.id_prefixes
.as_ref().or(self.id_prefixes.as_ref())
- .map_or(true, |prefixes| prefixes.iter().any(|pref| id.starts_with(pref)));
+ .map_or(true, |prefixes| {
+ prefixes.iter().any(|pref| id.starts_with(pref))
+ });
is_types_match && is_id_match
}
}
