diff --git a/src/gallium/frontends/rusticl/core/memory.rs b/src/gallium/frontends/rusticl/core/memory.rs index ef0f6bd036c..b28630c6ed2 100644 --- a/src/gallium/frontends/rusticl/core/memory.rs +++ b/src/gallium/frontends/rusticl/core/memory.rs @@ -767,7 +767,7 @@ impl MemBase { } pub fn is_parent_buffer(&self) -> bool { - self.parent.as_ref().map_or(false, |p| p.is_buffer()) + matches!(self.parent, Some(Mem::Buffer(_))) } pub fn is_image_from_buffer(&self) -> bool {