use find() instead of filter().next()

pull/538/head
zahash 3 months ago
parent 2bb2f8373b
commit d706826510

@ -162,8 +162,7 @@ The `limits` field describes the limit of certain types of resources that we can
// sRGB surfaces, you'll need to account for that when drawing to the frame.
let surface_format = surface_caps.formats.iter()
.copied()
.filter(|f| f.is_srgb())
.next()
.find(|f| f.is_srgb())
.unwrap_or(surface_caps.formats[0]);
let config = wgpu::SurfaceConfiguration {
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,

Loading…
Cancel
Save