From 4991d2cddcab0bdf98282533b5b95da20dfea061 Mon Sep 17 00:00:00 2001 From: JMS55 <47158642+JMS55@users.noreply.github.com> Date: Fri, 29 May 2020 08:29:12 -0400 Subject: [PATCH] Switch from futures-executor to pollster (#84) --- Cargo.toml | 2 +- src/lib.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3671967..068a9ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ include = [ [dependencies] thiserror = "1.0.15" wgpu = "0.5.0" -futures-executor = "0.3" +pollster = "0.2" ultraviolet = "0.4.6" [dev-dependencies] diff --git a/src/lib.rs b/src/lib.rs index 6f5bcf5..38c58b0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -557,7 +557,7 @@ impl<'req> PixelsBuilder<'req> { /// Returns an error when a [`wgpu::Adapter`] cannot be found. pub fn build(self) -> Result { // TODO: Use `options.pixel_aspect_ratio` to stretch the scaled texture - let adapter = futures_executor::block_on(wgpu::Adapter::request( + let adapter = pollster::block_on(wgpu::Adapter::request( &self .request_adapter_options .unwrap_or(wgpu::RequestAdapterOptions { @@ -568,8 +568,7 @@ impl<'req> PixelsBuilder<'req> { )) .ok_or(Error::AdapterNotFound)?; - let (device, queue) = - futures_executor::block_on(adapter.request_device(&self.device_descriptor)); + let (device, queue) = pollster::block_on(adapter.request_device(&self.device_descriptor)); let device = Rc::new(device); let queue = Rc::new(RefCell::new(queue));