summaryrefslogtreecommitdiffstats
path: root/graphics/src/cached.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/cached.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/cached.rs')
-rw-r--r--graphics/src/cached.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/graphics/src/cached.rs b/graphics/src/cached.rs
index f7968c9f..b52f9d9d 100644
--- a/graphics/src/cached.rs
+++ b/graphics/src/cached.rs
@@ -31,3 +31,12 @@ impl<T> Cached for Primitive<T> {
Arc::new(self)
}
}
+
+#[cfg(debug_assertions)]
+impl Cached for () {
+ type Cache = ();
+
+ fn load(_cache: &Self::Cache) -> Self {}
+
+ fn cache(self) -> Self::Cache {}
+}