summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/src/gpu_allocator.rs3
-rw-r--r--resources/src/system_allocator.rs4
2 files changed, 4 insertions, 3 deletions
diff --git a/resources/src/gpu_allocator.rs b/resources/src/gpu_allocator.rs
index c2f1c20..7b40a22 100644
--- a/resources/src/gpu_allocator.rs
+++ b/resources/src/gpu_allocator.rs
@@ -113,6 +113,7 @@ pub fn create_gpu_memory_allocator() -> Result<Option<Box<GpuMemoryAllocator>>,
 }
 
 #[cfg(not(feature = "wl-dmabuf"))]
-pub fn create_gpu_memory_allocator() -> Result<Option<Box<GpuMemoryAllocator>>, GpuAllocatorError> {
+pub fn create_gpu_memory_allocator(
+) -> Result<Option<Box<dyn GpuMemoryAllocator>>, GpuAllocatorError> {
     Ok(None)
 }
diff --git a/resources/src/system_allocator.rs b/resources/src/system_allocator.rs
index 0810889..8cde454 100644
--- a/resources/src/system_allocator.rs
+++ b/resources/src/system_allocator.rs
@@ -27,7 +27,7 @@ pub struct SystemAllocator {
     io_address_space: Option<AddressAllocator>,
     device_address_space: AddressAllocator,
     mmio_address_space: AddressAllocator,
-    gpu_allocator: Option<Box<GpuMemoryAllocator>>,
+    gpu_allocator: Option<Box<dyn GpuMemoryAllocator>>,
     next_irq: u32,
 }
 
@@ -98,7 +98,7 @@ impl SystemAllocator {
     }
 
     /// Gets an allocator to be used for GPU memory.
-    pub fn gpu_memory_allocator(&self) -> Option<&GpuMemoryAllocator> {
+    pub fn gpu_memory_allocator(&self) -> Option<&dyn GpuMemoryAllocator> {
         self.gpu_allocator.as_ref().map(|v| v.as_ref())
     }
 }