Use expect in integration_wgpu example
... together with `first` and `copied`.
This commit is contained in:
parent
8b250d12e7
commit
2010977bd2
1 changed files with 5 additions and 1 deletions
|
|
@ -89,7 +89,11 @@ pub fn main() {
|
||||||
let needed_limits = wgpu::Limits::default();
|
let needed_limits = wgpu::Limits::default();
|
||||||
|
|
||||||
(
|
(
|
||||||
surface.get_supported_formats(&adapter)[0],
|
surface
|
||||||
|
.get_supported_formats(&adapter)
|
||||||
|
.first()
|
||||||
|
.copied()
|
||||||
|
.expect("Get preferred format"),
|
||||||
adapter
|
adapter
|
||||||
.request_device(
|
.request_device(
|
||||||
&wgpu::DeviceDescriptor {
|
&wgpu::DeviceDescriptor {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue