anvil.window_map: implement Clone for Kind
This commit is contained in:
parent
33a9e242ed
commit
6d36375f27
|
@ -19,6 +19,16 @@ pub enum Kind<R> {
|
||||||
Wl(ShellSurface<R>),
|
Wl(ShellSurface<R>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We implement Clone manually because #[derive(..)] would require R: Clone.
|
||||||
|
impl<R> Clone for Kind<R> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
match self {
|
||||||
|
Kind::Xdg(xdg) => Kind::Xdg(xdg.clone()),
|
||||||
|
Kind::Wl(wl) => Kind::Wl(wl.clone()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<R> Kind<R>
|
impl<R> Kind<R>
|
||||||
where
|
where
|
||||||
R: Role<SubsurfaceRole> + Role<XdgSurfaceRole> + Role<ShellSurfaceRole> + 'static,
|
R: Role<SubsurfaceRole> + Role<XdgSurfaceRole> + Role<ShellSurfaceRole> + 'static,
|
||||||
|
|
Loading…
Reference in New Issue