all: use let chains
This commit is contained in:
parent
3d5d146d65
commit
286857971a
89 changed files with 1516 additions and 1574 deletions
|
|
@ -33,10 +33,10 @@ impl VulkanRenderer {
|
|||
let height = height as u32;
|
||||
let cached = &mut *self.blend_buffers.borrow_mut();
|
||||
let cached = cached.entry((width, height));
|
||||
if let Entry::Occupied(entry) = &cached {
|
||||
if let Some(buffer) = entry.get().upgrade() {
|
||||
return Ok(buffer);
|
||||
}
|
||||
if let Entry::Occupied(entry) = &cached
|
||||
&& let Some(buffer) = entry.get().upgrade()
|
||||
{
|
||||
return Ok(buffer);
|
||||
}
|
||||
let limits = self.device.blend_limits;
|
||||
if width > limits.max_width || height > limits.max_height {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue