diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-02 00:36:10 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-02 00:36:10 +0200 |
| commit | fe0938b1de0c46fc2afcaa3dcd6a0f4ec870d21a (patch) | |
| tree | 8db7509894842395cfb309f00c41b7f4d173888c /src/sheet/cell.rs | |
| parent | 1e1eb95926f556e666bc20355327abd24d264858 (diff) | |
add state which is shared with the lua environment
Diffstat (limited to 'src/sheet/cell.rs')
| -rw-r--r-- | src/sheet/cell.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sheet/cell.rs b/src/sheet/cell.rs index 3b18bde..b46b7d4 100644 --- a/src/sheet/cell.rs +++ b/src/sheet/cell.rs @@ -85,7 +85,7 @@ pub struct CellRef { row: usize, column: usize, sheet_id: SheetId, - cell: Cell, + value: Cell, } impl CellRef { @@ -98,7 +98,7 @@ impl CellRef { sheet_id, row, column, - cell + value: cell } } @@ -109,18 +109,18 @@ impl CellRef { sheet_id, row, column, - cell: cell.clone(), + value: cell.clone(), }) }) .unwrap_or(None) } pub fn value(&self) -> Cell { - self.cell.clone() + self.value.clone() } pub fn set_value(&mut self, cell: Cell) { - self.cell = cell.clone(); + self.value = cell.clone(); Register::get(self.sheet_id) .unwrap() .write() |