refactor: remove Box
This commit is contained in:
parent
68f111cfd0
commit
a83bf83784
2 changed files with 2 additions and 4 deletions
|
|
@ -135,7 +135,7 @@ impl DndProvider for Clipboard {
|
||||||
tx: Box<dyn dnd::Sender<DndSurface> + Send + Sync + 'static>,
|
tx: Box<dyn dnd::Sender<DndSurface> + Send + Sync + 'static>,
|
||||||
) {
|
) {
|
||||||
match self {
|
match self {
|
||||||
Clipboard::Wayland(c) => c.init_dnd(DndSender(Arc::new(tx))),
|
Clipboard::Wayland(c) => c.init_dnd(DndSender(Arc::from(tx))),
|
||||||
Clipboard::X11(_) => {}
|
Clipboard::X11(_) => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,7 @@ use smithay_clipboard::dnd::{Icon, Rectangle};
|
||||||
pub use smithay_clipboard::mime::{AllowedMimeTypes, AsMimeTypes, MimeType};
|
pub use smithay_clipboard::mime::{AllowedMimeTypes, AsMimeTypes, MimeType};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct DndSender(
|
pub struct DndSender(pub Arc<dyn Sender<DndSurface> + 'static + Send + Sync>);
|
||||||
pub Arc<Box<dyn Sender<DndSurface> + 'static + Send + Sync>>,
|
|
||||||
);
|
|
||||||
|
|
||||||
impl smithay_clipboard::dnd::Sender<DndSurface> for DndSender {
|
impl smithay_clipboard::dnd::Sender<DndSurface> for DndSender {
|
||||||
fn send(
|
fn send(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue