diff --git a/src/wayland/dmabuf/mod.rs b/src/wayland/dmabuf/mod.rs index af8a681..7ebb0c7 100644 --- a/src/wayland/dmabuf/mod.rs +++ b/src/wayland/dmabuf/mod.rs @@ -186,7 +186,7 @@ where let log = crate::slog_or_fallback(logger).new(o!("smithay_module" => "dmabuf_handler")); let max_planes = formats.iter().map(|f| f.plane_count).max().unwrap_or(0); - let formats = Rc::new(formats); + let formats = Rc::<[Format]>::from(formats); let handler = Rc::new(RefCell::new(handler)); trace!( @@ -262,7 +262,7 @@ struct ParamsHandler { pending_planes: Vec, max_planes: u32, used: bool, - formats: Rc>, + formats: Rc<[Format]>, handler: Rc>, log: ::slog::Logger, } diff --git a/src/wayland/shm/mod.rs b/src/wayland/shm/mod.rs index 444deaa..b86e945 100644 --- a/src/wayland/shm/mod.rs +++ b/src/wayland/shm/mod.rs @@ -88,7 +88,7 @@ mod pool; /// This type is only visible as type parameter of /// the `Global` handle you are provided. pub struct ShmGlobalData { - formats: Rc>, + formats: Rc<[wl_shm::Format]>, log: ::slog::Logger, } @@ -115,7 +115,7 @@ where formats.push(wl_shm::Format::Argb8888); formats.push(wl_shm::Format::Xrgb8888); let data = ShmGlobalData { - formats: Rc::new(formats), + formats: formats.into(), log: log.new(o!("smithay_module" => "shm_handler")), };