summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wgpu/src/backend.rs10
-rw-r--r--wgpu/src/text.rs1
2 files changed, 6 insertions, 5 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs
index 7f44fafa..e650d9a5 100644
--- a/wgpu/src/backend.rs
+++ b/wgpu/src/backend.rs
@@ -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;
}
}
diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs
index 4406177a..c0f49417 100644
--- a/wgpu/src/text.rs
+++ b/wgpu/src/text.rs
@@ -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 {