summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-06-14 01:57:49 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-06-14 01:57:49 +0200
commit4e7cbbf98ab745351e2fb13a7c85d4ad560c21ee (patch)
treeb1bad3d579ec580c40b9013c389c82376423ce7e
parent4ab4ffc9cfa6d7bddddb2c4d513e2120244259a1 (diff)
downloadiced-4e7cbbf98ab745351e2fb13a7c85d4ad560c21ee.tar.gz
iced-4e7cbbf98ab745351e2fb13a7c85d4ad560c21ee.tar.bz2
iced-4e7cbbf98ab745351e2fb13a7c85d4ad560c21ee.zip
Move `Maybe*` traits back to `iced_futures`
-rw-r--r--core/src/lib.rs2
-rw-r--r--futures/src/event.rs2
-rw-r--r--futures/src/executor.rs3
-rw-r--r--futures/src/keyboard.rs2
-rw-r--r--futures/src/lib.rs2
-rw-r--r--futures/src/maybe.rs (renamed from core/src/maybe.rs)0
-rw-r--r--futures/src/runtime.rs3
-rw-r--r--futures/src/subscription.rs3
-rw-r--r--futures/src/subscription/tracker.rs3
-rw-r--r--graphics/src/compositor.rs3
-rw-r--r--runtime/src/task.rs3
11 files changed, 12 insertions, 14 deletions
diff --git a/core/src/lib.rs b/core/src/lib.rs
index db67219c..32156441 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -35,7 +35,6 @@ mod color;
mod content_fit;
mod element;
mod length;
-mod maybe;
mod padding;
mod pixels;
mod point;
@@ -60,7 +59,6 @@ pub use font::Font;
pub use gradient::Gradient;
pub use layout::Layout;
pub use length::Length;
-pub use maybe::{MaybeSend, MaybeSync};
pub use overlay::Overlay;
pub use padding::Padding;
pub use pixels::Pixels;
diff --git a/futures/src/event.rs b/futures/src/event.rs
index ab895fcd..72ea78ad 100644
--- a/futures/src/event.rs
+++ b/futures/src/event.rs
@@ -1,8 +1,8 @@
//! Listen to runtime events.
use crate::core::event::{self, Event};
use crate::core::window;
-use crate::core::MaybeSend;
use crate::subscription::{self, Subscription};
+use crate::MaybeSend;
/// Returns a [`Subscription`] to all the ignored runtime events.
///
diff --git a/futures/src/executor.rs b/futures/src/executor.rs
index a9dde465..3b0d4af1 100644
--- a/futures/src/executor.rs
+++ b/futures/src/executor.rs
@@ -1,5 +1,6 @@
//! Choose your preferred executor to power a runtime.
-use crate::core::MaybeSend;
+use crate::MaybeSend;
+
use futures::Future;
/// A type that can run futures.
diff --git a/futures/src/keyboard.rs b/futures/src/keyboard.rs
index c86e2169..f0d7d757 100644
--- a/futures/src/keyboard.rs
+++ b/futures/src/keyboard.rs
@@ -2,8 +2,8 @@
use crate::core;
use crate::core::event;
use crate::core::keyboard::{Event, Key, Modifiers};
-use crate::core::MaybeSend;
use crate::subscription::{self, Subscription};
+use crate::MaybeSend;
/// Listens to keyboard key presses and calls the given function
/// map them into actual messages.
diff --git a/futures/src/lib.rs b/futures/src/lib.rs
index 01b56306..a874a618 100644
--- a/futures/src/lib.rs
+++ b/futures/src/lib.rs
@@ -8,6 +8,7 @@
pub use futures;
pub use iced_core as core;
+mod maybe;
mod runtime;
pub mod backend;
@@ -17,6 +18,7 @@ pub mod keyboard;
pub mod subscription;
pub use executor::Executor;
+pub use maybe::{MaybeSend, MaybeSync};
pub use platform::*;
pub use runtime::Runtime;
pub use subscription::Subscription;
diff --git a/core/src/maybe.rs b/futures/src/maybe.rs
index c6a507c1..c6a507c1 100644
--- a/core/src/maybe.rs
+++ b/futures/src/maybe.rs
diff --git a/futures/src/runtime.rs b/futures/src/runtime.rs
index 045fde6c..157e2c67 100644
--- a/futures/src/runtime.rs
+++ b/futures/src/runtime.rs
@@ -1,7 +1,6 @@
//! Run commands and keep track of subscriptions.
-use crate::core::MaybeSend;
use crate::subscription;
-use crate::{BoxFuture, BoxStream, Executor};
+use crate::{BoxFuture, BoxStream, Executor, MaybeSend};
use futures::{channel::mpsc, Sink};
use std::marker::PhantomData;
diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs
index 85a8a787..316fc44d 100644
--- a/futures/src/subscription.rs
+++ b/futures/src/subscription.rs
@@ -5,9 +5,8 @@ pub use tracker::Tracker;
use crate::core::event;
use crate::core::window;
-use crate::core::MaybeSend;
use crate::futures::{Future, Stream};
-use crate::BoxStream;
+use crate::{BoxStream, MaybeSend};
use futures::channel::mpsc;
use futures::never::Never;
diff --git a/futures/src/subscription/tracker.rs b/futures/src/subscription/tracker.rs
index c5a7bb99..f17e3ea3 100644
--- a/futures/src/subscription/tracker.rs
+++ b/futures/src/subscription/tracker.rs
@@ -1,6 +1,5 @@
-use crate::core::MaybeSend;
use crate::subscription::{Event, Hasher, Recipe};
-use crate::BoxFuture;
+use crate::{BoxFuture, MaybeSend};
use futures::channel::mpsc;
use futures::sink::{Sink, SinkExt};
diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs
index 4ac90f92..47521eb0 100644
--- a/graphics/src/compositor.rs
+++ b/graphics/src/compositor.rs
@@ -1,6 +1,7 @@
//! A compositor is responsible for initializing a renderer and managing window
//! surfaces.
-use crate::core::{Color, MaybeSend, MaybeSync};
+use crate::core::Color;
+use crate::futures::{MaybeSend, MaybeSync};
use crate::{Error, Settings, Viewport};
use raw_window_handle::{HasDisplayHandle, HasWindowHandle};
diff --git a/runtime/src/task.rs b/runtime/src/task.rs
index f3ddbca1..db3c0674 100644
--- a/runtime/src/task.rs
+++ b/runtime/src/task.rs
@@ -1,11 +1,10 @@
use crate::core::widget;
-use crate::core::MaybeSend;
use crate::futures::futures::channel::mpsc;
use crate::futures::futures::channel::oneshot;
use crate::futures::futures::future::{self, FutureExt};
use crate::futures::futures::never::Never;
use crate::futures::futures::stream::{self, Stream, StreamExt};
-use crate::futures::{boxed_stream, BoxStream};
+use crate::futures::{boxed_stream, BoxStream, MaybeSend};
use crate::Action;
use std::future::Future;