summaryrefslogtreecommitdiffstats
path: root/native/src/clipboard.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-08-17 15:54:31 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-08-17 15:54:31 +0200
commit23229e00f608585bf2d623709a4240296721777d (patch)
treedf779ca4b46105fc8db6395d2480f07f83a9114a /native/src/clipboard.rs
parentf21d1209aa576a3e597c100fa56afe554dc2babd (diff)
downloadiced-23229e00f608585bf2d623709a4240296721777d.tar.gz
iced-23229e00f608585bf2d623709a4240296721777d.tar.bz2
iced-23229e00f608585bf2d623709a4240296721777d.zip
Use `FnOnce` in `Command::perform`
... and revert `FnMut` usage.
Diffstat (limited to '')
-rw-r--r--native/src/clipboard.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/native/src/clipboard.rs b/native/src/clipboard.rs
index 6a77334c..c9105bc0 100644
--- a/native/src/clipboard.rs
+++ b/native/src/clipboard.rs
@@ -30,7 +30,7 @@ impl Clipboard for Null {
/// [`Command`]: crate::Command
pub enum Action<T> {
/// Read the clipboard and produce `T` with the result.
- Read(Box<dyn FnOnce(Option<String>) -> T>),
+ Read(Box<dyn Fn(Option<String>) -> T>),
/// Write the given contents to the clipboard.
Write(String),
@@ -40,7 +40,7 @@ impl<T> Action<T> {
/// Maps the output of a clipboard [`Action`] using the provided closure.
pub fn map<A>(
self,
- f: impl FnOnce(T) -> A + 'static + MaybeSend + Sync,
+ f: impl Fn(T) -> A + 'static + MaybeSend + Sync,
) -> Action<A>
where
T: 'static,