summaryrefslogtreecommitdiffstats
path: root/futures
diff options
context:
space:
mode:
authorLibravatar Bingus <shankern@protonmail.com>2023-02-15 14:55:02 -0800
committerLibravatar Bingus <shankern@protonmail.com>2023-02-15 14:55:02 -0800
commit63fb608d8bea8a653bf011f5f9cffc88525576e0 (patch)
tree938c15b85fd9d27ee3a82806cf83bc211e7b94dd /futures
parent64e0e817c27d720dc954ee94de58ded35b3f9f9a (diff)
parent0cb72f69716adc82ad85a0ee7120edb6e653b0c0 (diff)
downloadiced-63fb608d8bea8a653bf011f5f9cffc88525576e0.tar.gz
iced-63fb608d8bea8a653bf011f5f9cffc88525576e0.tar.bz2
iced-63fb608d8bea8a653bf011f5f9cffc88525576e0.zip
Merge remote-tracking branch 'origin/master' into feat/multi-window-support
# Conflicts: # native/src/command/action.rs # native/src/window/action.rs # winit/src/window.rs
Diffstat (limited to '')
-rw-r--r--futures/src/backend/native/async_std.rs1
-rw-r--r--futures/src/backend/native/tokio.rs1
-rw-r--r--futures/src/command.rs1
-rw-r--r--futures/src/subscription.rs1
4 files changed, 4 insertions, 0 deletions
diff --git a/futures/src/backend/native/async_std.rs b/futures/src/backend/native/async_std.rs
index e8641626..b324dbf1 100644
--- a/futures/src/backend/native/async_std.rs
+++ b/futures/src/backend/native/async_std.rs
@@ -10,6 +10,7 @@ impl crate::Executor for Executor {
Ok(Self)
}
+ #[allow(clippy::let_underscore_future)]
fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) {
let _ = async_std::task::spawn(future);
}
diff --git a/futures/src/backend/native/tokio.rs b/futures/src/backend/native/tokio.rs
index f86b0ea3..dd818bd1 100644
--- a/futures/src/backend/native/tokio.rs
+++ b/futures/src/backend/native/tokio.rs
@@ -9,6 +9,7 @@ impl crate::Executor for Executor {
tokio::runtime::Runtime::new()
}
+ #[allow(clippy::let_underscore_future)]
fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) {
let _ = tokio::runtime::Runtime::spawn(self, future);
}
diff --git a/futures/src/command.rs b/futures/src/command.rs
index 05c3a1d0..3d1ec3f9 100644
--- a/futures/src/command.rs
+++ b/futures/src/command.rs
@@ -1,4 +1,5 @@
/// A set of asynchronous actions to be performed by some runtime.
+#[must_use = "`Command` must be returned to runtime to take effect"]
#[derive(Debug)]
pub struct Command<T>(Internal<T>);
diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs
index e96fa704..d18ec4f7 100644
--- a/futures/src/subscription.rs
+++ b/futures/src/subscription.rs
@@ -20,6 +20,7 @@ use crate::BoxStream;
/// `Hasher`.
///
/// [`Command`]: crate::Command
+#[must_use = "`Subscription` must be returned to runtime to take effect"]
pub struct Subscription<Hasher, Event, Output> {
recipes: Vec<Box<dyn Recipe<Hasher, Event, Output = Output>>>,
}