From 51f00fbd1f62e992080c1d796b6eaae76d66ced8 Mon Sep 17 00:00:00 2001 From: Arman Uguray Date: Mon, 24 Apr 2023 10:41:25 -0700 Subject: [PATCH] Fix the headless example for wgpu 0.16 --- examples/headless/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/headless/src/main.rs b/examples/headless/src/main.rs index 93e3234..0fa9c7e 100644 --- a/examples/headless/src/main.rs +++ b/examples/headless/src/main.rs @@ -1,6 +1,5 @@ use std::{ fs::File, - num::NonZeroU32, path::{Path, PathBuf}, }; @@ -189,7 +188,7 @@ async fn render(mut scenes: SceneSet, index: usize, args: &Args) -> Result<()> { buffer: &buffer, layout: wgpu::ImageDataLayout { offset: 0, - bytes_per_row: NonZeroU32::new(padded_byte_width), + bytes_per_row: Some(padded_byte_width), rows_per_image: None, }, },