Slim dependencies (#71)

This commit is contained in:
Jay Oster 2020-04-13 21:06:01 -07:00 committed by GitHub
parent f874d976c9
commit 774b749145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -25,7 +25,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
thiserror = "1.0.15"
wgpu = "0.5.0"
futures = "0.3"
futures-executor = "0.3"
[dev-dependencies]
pixels-mocks = { path = "pixels-mocks" }

View file

@ -426,13 +426,13 @@ impl<'req> PixelsBuilder<'req> {
/// Returns an error when a [`wgpu::Adapter`] cannot be found.
pub fn build(self) -> Result<Pixels, Error> {
// TODO: Use `options.pixel_aspect_ratio` to stretch the scaled texture
let adapter = futures::executor::block_on(wgpu::Adapter::request(
let adapter = futures_executor::block_on(wgpu::Adapter::request(
&self.request_adapter_options,
wgpu::BackendBit::PRIMARY,
))
.ok_or(Error::AdapterNotFound)?;
let (device, queue) =
futures::executor::block_on(adapter.request_device(&self.device_descriptor));
futures_executor::block_on(adapter.request_device(&self.device_descriptor));
let device = Rc::new(device);
let queue = Rc::new(RefCell::new(queue));