summaryrefslogtreecommitdiffstats
path: root/wgpu/src/widget/canvas/drawable.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-28 06:24:12 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-28 06:24:12 +0200
commit2539042b71d70afd4d8f262783d441e768811ee9 (patch)
treef3af8a86b700308ff5fe9f28f88a508b2fd8cdb5 /wgpu/src/widget/canvas/drawable.rs
parent7f1e7aea07bb448471470093a47898b059d940d3 (diff)
downloadiced-2539042b71d70afd4d8f262783d441e768811ee9.tar.gz
iced-2539042b71d70afd4d8f262783d441e768811ee9.tar.bz2
iced-2539042b71d70afd4d8f262783d441e768811ee9.zip
Remove `Drawable` and rename `State` to `Program`
Diffstat (limited to 'wgpu/src/widget/canvas/drawable.rs')
-rw-r--r--wgpu/src/widget/canvas/drawable.rs36
1 files changed, 0 insertions, 36 deletions
diff --git a/wgpu/src/widget/canvas/drawable.rs b/wgpu/src/widget/canvas/drawable.rs
deleted file mode 100644
index 5209fa6f..00000000
--- a/wgpu/src/widget/canvas/drawable.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-use crate::canvas::Frame;
-
-/// A type that can be drawn on a [`Frame`].
-///
-/// [`Frame`]: struct.Frame.html
-pub trait Drawable {
- /// Draws the [`Drawable`] on the given [`Frame`].
- ///
- /// [`Drawable`]: trait.Drawable.html
- /// [`Frame`]: struct.Frame.html
- fn draw(&self, frame: &mut Frame);
-}
-
-impl<'a> Drawable for dyn Fn(&mut Frame) + 'a {
- fn draw(&self, frame: &mut Frame) {
- self(frame)
- }
-}
-
-impl<T> Drawable for &T
-where
- T: Drawable,
-{
- fn draw(&self, frame: &mut Frame) {
- T::draw(self, frame)
- }
-}
-
-impl<T> Drawable for &[T]
-where
- T: Drawable,
-{
- fn draw(&self, frame: &mut Frame) {
- self.iter().for_each(|drawable| drawable.draw(frame));
- }
-}