Remove `canvas::Data` leftover
This commit is contained in:
parent
4a24392c9c
commit
629153582f
|
@ -9,12 +9,10 @@ use std::hash::Hash;
|
|||
pub mod layer;
|
||||
pub mod path;
|
||||
|
||||
mod data;
|
||||
mod fill;
|
||||
mod frame;
|
||||
mod stroke;
|
||||
|
||||
pub use data::Data;
|
||||
pub use fill::Fill;
|
||||
pub use frame::Frame;
|
||||
pub use layer::Layer;
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||
pub struct Data<T> {
|
||||
raw: T,
|
||||
version: usize,
|
||||
}
|
||||
|
||||
impl<T> Data<T> {
|
||||
pub fn new(data: T) -> Self {
|
||||
Data {
|
||||
raw: data,
|
||||
version: 0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update(&mut self, f: impl FnOnce(&mut T)) {
|
||||
f(&mut self.raw);
|
||||
|
||||
self.version += 1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue