1
Fork 0

is_{some,ok}_and

This commit is contained in:
Michael Goulet 2023-11-25 17:12:15 +00:00
parent fe3038f263
commit 079a2e865f
8 changed files with 21 additions and 13 deletions

View file

@ -40,7 +40,7 @@ impl Instance {
pub fn is_foreign_item(&self) -> bool {
let item = CrateItem::try_from(*self);
item.as_ref().map_or(false, CrateItem::is_foreign_item)
item.as_ref().is_ok_and(CrateItem::is_foreign_item)
}
/// Get the instance type with generic substitutions applied and lifetimes erased.