From 58c042f43913adddfe0470615748a89e8c4c6487 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Mon, 29 Jan 2024 19:54:01 +0100 Subject: [PATCH] rusticl/mem: use pattern matching in is_parent_buffer Part-of: --- src/gallium/frontends/rusticl/core/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {