Make thread-pool optional in iced_futures
This commit is contained in:
parent
b8b0d97525
commit
35760ac68f
3 changed files with 10 additions and 2 deletions
|
|
@ -10,12 +10,14 @@ documentation = "https://docs.rs/iced_futures"
|
|||
keywords = ["gui", "ui", "graphics", "interface", "futures"]
|
||||
categories = ["gui"]
|
||||
|
||||
[features]
|
||||
thread-pool = ["futures/thread-pool"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
|
||||
[dependencies.futures]
|
||||
version = "0.3"
|
||||
features = ["thread-pool"]
|
||||
|
||||
[dependencies.tokio]
|
||||
version = "0.2"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ pub trait Executor {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "thread-pool")]
|
||||
impl Executor for futures::executor::ThreadPool {
|
||||
fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) {
|
||||
self.spawn_ok(future);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue