refactor: remove Box

This commit is contained in:
Ashley Wulber 2024-10-21 11:14:55 -04:00
parent 68f111cfd0
commit a83bf83784
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
2 changed files with 2 additions and 4 deletions

View file

@ -135,7 +135,7 @@ impl DndProvider for Clipboard {
tx: Box<dyn dnd::Sender<DndSurface> + Send + Sync + 'static>,
) {
match self {
Clipboard::Wayland(c) => c.init_dnd(DndSender(Arc::new(tx))),
Clipboard::Wayland(c) => c.init_dnd(DndSender(Arc::from(tx))),
Clipboard::X11(_) => {}
}
}

View file

@ -27,9 +27,7 @@ use smithay_clipboard::dnd::{Icon, Rectangle};
pub use smithay_clipboard::mime::{AllowedMimeTypes, AsMimeTypes, MimeType};
#[derive(Clone)]
pub struct DndSender(
pub Arc<Box<dyn Sender<DndSurface> + 'static + Send + Sync>>,
);
pub struct DndSender(pub Arc<dyn Sender<DndSurface> + 'static + Send + Sync>);
impl smithay_clipboard::dnd::Sender<DndSurface> for DndSender {
fn send(