We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36fccf1 commit 7f77477Copy full SHA for 7f77477
1 file changed
experimentation/wgpu-cli-2/src/main.rs
@@ -124,8 +124,7 @@ impl RenderState {
124
async fn new(width: u32, height: u32) -> Result<Self, Box<dyn std::error::Error>> {
125
// Create instance
126
let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor {
127
- backends: wgpu::Backends::from_env()
128
- .ok_or("Failed to parse WGPU_BACKENDS env var")?,
+ backends: wgpu::Backends::from_env().unwrap_or_default(),
129
..Default::default()
130
});
131
0 commit comments