1
0
Fork 0
forked from wry/wry

all: use let chains

This commit is contained in:
Julian Orth 2025-07-01 11:20:48 +02:00
parent 3d5d146d65
commit 286857971a
89 changed files with 1516 additions and 1574 deletions

View file

@ -504,10 +504,10 @@ impl CpuJob for RenderJob {
data.complete(Ok(()));
return;
}
if let Some(t) = &tex {
if !t.compatible_with(ARGB8888, rt.width, rt.height, rt.stride) {
tex = None;
}
if let Some(t) = &tex
&& !t.compatible_with(ARGB8888, rt.width, rt.height, rt.stride)
{
tex = None;
}
let tex = match tex {
Some(t) => t,
@ -527,10 +527,10 @@ impl CpuJob for RenderJob {
}
};
let mut staging_opt = data.staging.take();
if let Some(staging) = &staging_opt {
if staging.size() != tex.staging_size() {
staging_opt = None;
}
if let Some(staging) = &staging_opt
&& staging.size() != tex.staging_size()
{
staging_opt = None;
}
let staging = match staging_opt {
Some(s) => s,