rusticl/mem: use pattern matching in is_parent_buffer

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
This commit is contained in:
Karol Herbst
2024-01-29 19:54:01 +01:00
committed by Marge Bot
parent d705307a72
commit 58c042f439
+1 -1
View File
@@ -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 {