1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 22:42:48 +03:00

remove unused rayon dep from the promise crate

This commit is contained in:
Wez Furlong 2019-10-28 08:33:10 -07:00
parent c8f39b9adf
commit 61fe33fbf6
2 changed files with 0 additions and 29 deletions

View File

@ -7,4 +7,3 @@ edition = "2018"
[dependencies]
failure = "0.1"
failure_derive = "0.1"
rayon = "1.0"

View File

@ -31,28 +31,6 @@ impl Executor for Box<dyn Executor> {
}
}
/// An executor for spawning futures into the rayon global
/// thread pool
#[derive(Clone, Default)]
pub struct RayonExecutor {}
impl RayonExecutor {
pub fn new() -> Self {
Self {}
}
}
impl BasicExecutor for RayonExecutor {
fn execute(&self, f: SpawnFunc) {
rayon::spawn(f);
}
}
impl Executor for RayonExecutor {
fn clone_executor(&self) -> Box<dyn Executor> {
Box::new(RayonExecutor::new())
}
}
enum PromiseState<T> {
Waiting(Arc<Core<T>>),
Fulfilled,
@ -436,10 +414,4 @@ mod test {
assert_eq!(f2.wait().unwrap(), 246);
}
#[test]
fn via_rayon() {
let f = Future::with_executor(RayonExecutor::new(), || Ok(true));
assert_eq!(f.wait().unwrap(), true);
}
}