diff --git a/native/src/widget/text_input/editor.rs b/native/src/widget/text_input/editor.rs index 71c4f292..c9b9795d 100644 --- a/native/src/widget/text_input/editor.rs +++ b/native/src/widget/text_input/editor.rs @@ -54,8 +54,7 @@ impl<'a> Editor<'a> { if start > 0 { self.cursor.move_left(self.value); - - let _ = self.value.remove(start - 1); + self.value.remove(start - 1); } } } @@ -70,7 +69,7 @@ impl<'a> Editor<'a> { let end = self.cursor.end(self.value); if end < self.value.len() { - let _ = self.value.remove(end); + self.value.remove(end); } } } diff --git a/src/executor.rs b/src/executor.rs index b4be5264..2067ffac 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -36,7 +36,7 @@ mod platform { &self, future: impl futures::Future + Send + 'static, ) { - let _ = self.0.spawn(future); + self.0.spawn(future); } fn enter(&self, f: impl FnOnce() -> R) -> R { diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs index c06af339..950c7693 100644 --- a/wgpu/src/renderer.rs +++ b/wgpu/src/renderer.rs @@ -103,8 +103,8 @@ impl Renderer { layers.push(Layer::new(Rectangle { x: 0, y: 0, - width: u32::from(width), - height: u32::from(height), + width, + height })); self.draw_primitive(Vector::new(0.0, 0.0), primitive, &mut layers); @@ -356,7 +356,7 @@ impl Renderer { ) { let bounds = layer.bounds * scale_factor; - if layer.meshes.len() > 0 { + if !layer.meshes.is_empty() { let scaled = transformation * Transformation::scale(scale_factor, scale_factor); @@ -372,7 +372,7 @@ impl Renderer { ); } - if layer.quads.len() > 0 { + if !layer.quads.is_empty() { self.quad_pipeline.draw( device, encoder, @@ -402,7 +402,7 @@ impl Renderer { } } - if layer.text.len() > 0 { + if !layer.text.is_empty() { for text in layer.text.iter() { // Target physical coordinates directly to avoid blurry text let text = wgpu_glyph::Section {