Rustfmt: use group_imports

This commit is contained in:
daxpedda 2024-07-07 18:38:50 +02:00
parent 936da131c2
commit 2665c12098
No known key found for this signature in database
GPG key ID: 43D62A3EA388E46F
86 changed files with 225 additions and 276 deletions

View file

@ -1,9 +1,10 @@
use super::super::main_thread::MainThreadMarker;
use super::{channel, Receiver, Sender, Wrapper};
use std::cell::Ref;
use std::rc::Rc;
use std::sync::{Arc, Condvar, Mutex};
use super::super::main_thread::MainThreadMarker;
use super::{channel, Receiver, Sender, Wrapper};
pub struct Dispatcher<T: 'static>(Wrapper<T, Arc<Sender<Closure<T>>>, Closure<T>>);
struct Closure<T>(Box<dyn FnOnce(&T) + Send>);

View file

@ -9,11 +9,12 @@ mod notifier;
mod waker;
mod wrapper;
use atomic_waker::AtomicWaker;
use concurrent_queue::{ConcurrentQueue, PushError};
pub use self::abortable::{AbortHandle, Abortable, DropAbortHandle};
pub use self::channel::{channel, Receiver, Sender};
pub use self::dispatcher::{DispatchRunner, Dispatcher};
pub use self::notifier::{Notified, Notifier};
pub use self::waker::{Waker, WakerSpawner};
use self::wrapper::Wrapper;
use atomic_waker::AtomicWaker;
use concurrent_queue::{ConcurrentQueue, PushError};

View file

@ -1,9 +1,10 @@
use super::super::main_thread::MainThreadMarker;
use std::cell::{Ref, RefCell};
use std::future::Future;
use std::marker::PhantomData;
use std::sync::Arc;
use super::super::main_thread::MainThreadMarker;
// Unsafe wrapper type that allows us to use `T` when it's not `Send` from other threads.
// `value` **must** only be accessed on the main thread.
pub struct Wrapper<V: 'static, S: Clone + Send, E> {