aboutsummaryrefslogtreecommitdiff
path: root/src/undo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/undo.rs')
-rw-r--r--src/undo.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/undo.rs b/src/undo.rs
index b590312..ae96a66 100644
--- a/src/undo.rs
+++ b/src/undo.rs
@@ -1,14 +1,16 @@
1use crate::bitmap::MapPoint;
2
1#[derive(Copy, Clone, Debug)] 3#[derive(Copy, Clone, Debug)]
2pub struct ModifyRecord { 4pub struct ModifyRecord {
3 pub point: (u32, u32), 5 pub point: MapPoint,
4 pub old_val: bool, 6 pub old_val: bool,
5 pub val: bool, 7 pub val: bool,
6} 8}
7 9
8impl ModifyRecord { 10impl ModifyRecord {
9 pub fn new(point: (u32, u32), old_val: bool, val: bool) -> Self { 11 pub fn new<P: Into<MapPoint>>(point: P, old_val: bool, val: bool) -> Self {
10 ModifyRecord { 12 ModifyRecord {
11 point, 13 point: point.into(),
12 old_val, 14 old_val,
13 val, 15 val,
14 } 16 }