Skip to content

Commit f6c7d24

Browse files
committed
add: Make Table and Column clonable
1 parent 06d24ad commit f6c7d24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/column.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::style::{CellAlignment, ColumnConstraint};
2727
/// // Align content in all cells of this column to the center of the cell.
2828
/// column.set_cell_alignment(CellAlignment::Center);
2929
/// ```
30-
#[derive(Debug)]
30+
#[derive(Debug, Clone)]
3131
pub struct Column {
3232
/// The index of the column
3333
pub index: usize,

src/table.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::utils::build_table;
2121
///
2222
/// There also exists a representation of a [Column].
2323
/// Columns are automatically created when adding rows to a table.
24-
#[derive(Debug)]
24+
#[derive(Debug, Clone)]
2525
pub struct Table {
2626
pub(crate) columns: Vec<Column>,
2727
style: HashMap<TableComponent, char>,

0 commit comments

Comments
 (0)