summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-24 02:08:20 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-24 02:08:20 +0100
commite657dc2ecd2ffa72c0abd87f9a59dcc1acbc7083 (patch)
tree1868220077e1b3f9ea57f601be2bd3aaf7def483 /core
parent999ad2d288a9354f045bb2e1b838014b3d302779 (diff)
downloadiced-e657dc2ecd2ffa72c0abd87f9a59dcc1acbc7083.tar.gz
iced-e657dc2ecd2ffa72c0abd87f9a59dcc1acbc7083.tar.bz2
iced-e657dc2ecd2ffa72c0abd87f9a59dcc1acbc7083.zip
Fine-tune `Catalog` approach for `button`, `checkbox`, and `svg`
Diffstat (limited to 'core')
-rw-r--r--core/src/closure.rs33
-rw-r--r--core/src/lib.rs1
2 files changed, 0 insertions, 34 deletions
diff --git a/core/src/closure.rs b/core/src/closure.rs
deleted file mode 100644
index dc7b4fee..00000000
--- a/core/src/closure.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-//! Box closures with ease.
-//!
-//! These are just a bunch of types that wrap boxed closures with
-//! blanket [`From`] implementations for easy conversions.
-//!
-//! Mainly, it allows functions to take `Into<T>` where `T` may end
-//! up being a boxed closure.
-
-/// A boxed closure that takes `A` by reference and produces `O`.
-#[allow(missing_debug_implementations)]
-pub struct Unary<'a, A, O>(pub Box<dyn Fn(&A) -> O + 'a>);
-
-impl<'a, A, O, T> From<T> for Unary<'a, A, O>
-where
- T: Fn(&A) -> O + 'a,
-{
- fn from(f: T) -> Self {
- Self(Box::new(f))
- }
-}
-
-/// A boxed closure that takes `A` by reference and `B` by value and produces `O`.
-#[allow(missing_debug_implementations)]
-pub struct Binary<'a, A, B, O>(pub Box<dyn Fn(&A, B) -> O + 'a>);
-
-impl<'a, A, B, O, T> From<T> for Binary<'a, A, B, O>
-where
- T: Fn(&A, B) -> O + 'a,
-{
- fn from(f: T) -> Self {
- Self(Box::new(f))
- }
-}
diff --git a/core/src/lib.rs b/core/src/lib.rs
index 36b47d80..d076413e 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -19,7 +19,6 @@
pub mod alignment;
pub mod border;
pub mod clipboard;
-pub mod closure;
pub mod event;
pub mod font;
pub mod gradient;