Use find(..) instead of filter(..).next()
This commit is contained in:
parent
3f0c226b74
commit
cc20baad6f
2 changed files with 2 additions and 4 deletions
|
|
@ -99,8 +99,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
.formats
|
||||
.iter()
|
||||
.copied()
|
||||
.filter(wgpu::TextureFormat::is_srgb)
|
||||
.next()
|
||||
.find(wgpu::TextureFormat::is_srgb)
|
||||
.or_else(|| capabilities.formats.first().copied())
|
||||
.expect("Get preferred format"),
|
||||
adapter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue