Implement Clone for pane_grid::State

This commit is contained in:
Héctor Ramón Jiménez 2020-05-07 00:40:07 +02:00
parent 33448508a5
commit d1f2a18439

View File

@ -21,7 +21,7 @@ use std::collections::HashMap;
/// [`Pane`]: struct.Pane.html /// [`Pane`]: struct.Pane.html
/// [`Split`]: struct.Split.html /// [`Split`]: struct.Split.html
/// [`State`]: struct.State.html /// [`State`]: struct.State.html
#[derive(Debug)] #[derive(Debug, Clone)]
pub struct State<T> { pub struct State<T> {
pub(super) panes: HashMap<Pane, T>, pub(super) panes: HashMap<Pane, T>,
pub(super) internal: Internal, pub(super) internal: Internal,
@ -248,7 +248,7 @@ impl<T> State<T> {
} }
} }
#[derive(Debug)] #[derive(Debug, Clone)]
pub struct Internal { pub struct Internal {
layout: Node, layout: Node,
last_id: usize, last_id: usize,