Collapse conditional and please clippy

This commit is contained in:
Héctor Ramón Jiménez 2023-02-09 07:00:21 +01:00
parent 2097a56b58
commit 17a4d817c4
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 6 additions and 5 deletions

View file

@ -137,17 +137,17 @@ impl Backend {
continue;
}
if !layer.text.is_empty() {
if !self.text_pipeline.prepare(
if !layer.text.is_empty()
&& !self.text_pipeline.prepare(
device,
queue,
&layer.text,
layer.bounds,
scale_factor,
target_size,
) {
return false;
}
)
{
return false;
}
}

View file

@ -187,6 +187,7 @@ impl Pipeline {
Err(glyphon::PrepareError::AtlasFull(content_type)) => {
self.prepare_layer = 0;
#[allow(clippy::needless_bool)]
if self.atlas.grow(device, content_type) {
false
} else {