diff options
author | 2022-07-04 01:17:29 +0200 | |
---|---|---|
committer | 2022-07-09 17:07:38 +0200 | |
commit | 15f794b7a89efb3299cb85b392ec13af145fb0fd (patch) | |
tree | 39d8c740168e4c09e15538451ba7f3899051ad43 /glow/src/quad/compatibility.rs | |
parent | e053e25d2ccb17f7a162685a106a8bbd915a873f (diff) | |
download | iced-15f794b7a89efb3299cb85b392ec13af145fb0fd.tar.gz iced-15f794b7a89efb3299cb85b392ec13af145fb0fd.tar.bz2 iced-15f794b7a89efb3299cb85b392ec13af145fb0fd.zip |
Address Clippy lints
Diffstat (limited to '')
-rw-r--r-- | glow/src/quad/compatibility.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/glow/src/quad/compatibility.rs b/glow/src/quad/compatibility.rs index 76f98ab7..7224e206 100644 --- a/glow/src/quad/compatibility.rs +++ b/glow/src/quad/compatibility.rs @@ -110,10 +110,8 @@ impl Pipeline { bounds: Rectangle<u32>, ) { // TODO: Remove this allocation (probably by changing the shader and removing the need of two `position`) - let vertices: Vec<Vertex> = instances - .iter() - .flat_map(|quad| Vertex::from_quad(quad)) - .collect(); + let vertices: Vec<Vertex> = + instances.iter().flat_map(Vertex::from_quad).collect(); // TODO: Remove this allocation (or allocate only when needed) let indices: Vec<i32> = (0..instances.len().min(MAX_QUADS) as i32) @@ -187,13 +185,13 @@ impl Pipeline { gl.buffer_sub_data_u8_slice( glow::ARRAY_BUFFER, 0, - bytemuck::cast_slice(&vertices), + bytemuck::cast_slice(vertices), ); gl.buffer_sub_data_u8_slice( glow::ELEMENT_ARRAY_BUFFER, 0, - bytemuck::cast_slice(&indices), + bytemuck::cast_slice(indices), ); gl.draw_elements( |