summaryrefslogtreecommitdiffstats
path: root/graphics/src/geometry.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-22 05:41:15 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-22 05:41:15 +0100
commit4f2f40c68b4647f281d34034beb159a41422aa06 (patch)
tree1fa11b5c4ed1bab19d5feff1beb122aa6a4955f5 /graphics/src/geometry.rs
parent1f13a91361258a1607c71f4840a26a6437f88612 (diff)
downloadiced-4f2f40c68b4647f281d34034beb159a41422aa06.tar.gz
iced-4f2f40c68b4647f281d34034beb159a41422aa06.tar.bz2
iced-4f2f40c68b4647f281d34034beb159a41422aa06.zip
Fix standalone compilation of `iced_widget` crate
Diffstat (limited to 'graphics/src/geometry.rs')
-rw-r--r--graphics/src/geometry.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/graphics/src/geometry.rs b/graphics/src/geometry.rs
index 194f37b2..d251efb8 100644
--- a/graphics/src/geometry.rs
+++ b/graphics/src/geometry.rs
@@ -44,3 +44,13 @@ pub trait Backend {
/// Creates a new [`Self::Frame`].
fn new_frame(&self, size: Size) -> Self::Frame;
}
+
+#[cfg(debug_assertions)]
+impl Renderer for () {
+ type Geometry = ();
+ type Frame = ();
+
+ fn new_frame(&self, _size: Size) -> Self::Frame {}
+
+ fn draw_geometry(&mut self, _geometry: Self::Geometry) {}
+}