From 629153582f1a43516092d941d2b4e2372a6ea054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 12 Feb 2020 09:24:22 +0100 Subject: [PATCH] Remove `canvas::Data` leftover --- wgpu/src/widget/canvas.rs | 2 -- wgpu/src/widget/canvas/data.rs | 20 -------------------- 2 files changed, 22 deletions(-) delete mode 100644 wgpu/src/widget/canvas/data.rs diff --git a/wgpu/src/widget/canvas.rs b/wgpu/src/widget/canvas.rs index 1fc3ff01..e8fdc1e8 100644 --- a/wgpu/src/widget/canvas.rs +++ b/wgpu/src/widget/canvas.rs @@ -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; diff --git a/wgpu/src/widget/canvas/data.rs b/wgpu/src/widget/canvas/data.rs deleted file mode 100644 index 25d94f4c..00000000 --- a/wgpu/src/widget/canvas/data.rs +++ /dev/null @@ -1,20 +0,0 @@ -#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] -pub struct Data { - raw: T, - version: usize, -} - -impl Data { - 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; - } -}