Remove `canvas::Data` leftover

This commit is contained in:
Héctor Ramón Jiménez 2020-02-12 09:24:22 +01:00
parent 4a24392c9c
commit 629153582f
2 changed files with 0 additions and 22 deletions

View File

@ -9,12 +9,10 @@ use std::hash::Hash;
pub mod layer; pub mod layer;
pub mod path; pub mod path;
mod data;
mod fill; mod fill;
mod frame; mod frame;
mod stroke; mod stroke;
pub use data::Data;
pub use fill::Fill; pub use fill::Fill;
pub use frame::Frame; pub use frame::Frame;
pub use layer::Layer; pub use layer::Layer;

View File

@ -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;
}
}