Skip to content

Commit 8630d80

Browse files
committed
Clippy.
1 parent 8e0c75b commit 8630d80

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

crates/processing_render/src/image.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ use bevy::{
66
},
77
ecs::{
88
entity::EntityHashMap,
9-
system::{RunSystemOnce, SystemState},
9+
system::RunSystemOnce,
1010
},
1111
prelude::*,
1212
render::{
13-
Extract, ExtractSchedule, MainWorld,
13+
ExtractSchedule, MainWorld,
1414
render_asset::{AssetExtractionSystems, RenderAssets},
1515
render_resource::{
1616
Buffer, BufferDescriptor, BufferUsages, CommandEncoderDescriptor, Extent3d, MapMode,
@@ -121,7 +121,7 @@ pub fn load(world: &mut World, path: PathBuf) -> Result<Entity> {
121121
let images = world.resource::<Assets<Image>>();
122122
let image = images
123123
.get(&handle)
124-
.ok_or_else(|| ProcessingError::ImageNotFound)?;
124+
.ok_or(ProcessingError::ImageNotFound)?;
125125

126126
let size = image.texture_descriptor.size;
127127
let texture_format = image.texture_descriptor.format;

crates/processing_render/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub mod error;
22
pub mod image;
33
pub mod render;
44

5-
use std::{cell::RefCell, ffi::c_void, num::NonZero, path::PathBuf, ptr::NonNull, sync::OnceLock};
5+
use std::{cell::RefCell, num::NonZero, path::PathBuf, ptr::NonNull, sync::OnceLock};
66

77
use bevy::{
88
app::{App, AppExit},

crates/processing_render/src/render/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pub mod primitive;
66
use bevy::{
77
camera::visibility::RenderLayers,
88
ecs::system::SystemParam,
9-
mesh::{Indices, VertexAttributeValues},
109
prelude::*,
1110
};
1211
use command::{CommandBuffer, DrawCommand};

crates/processing_render/src/render/primitive/rect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ fn simple_rect(mesh: &mut Mesh, x: f32, y: f32, w: f32, h: f32, color: Color) {
108108
}
109109

110110
if let Some(Indices::U32(indices)) = mesh.indices_mut() {
111-
indices.push(base_idx + 0);
111+
indices.push(base_idx);
112112
indices.push(base_idx + 1);
113113
indices.push(base_idx + 2);
114114

115-
indices.push(base_idx + 0);
115+
indices.push(base_idx);
116116
indices.push(base_idx + 2);
117117
indices.push(base_idx + 3);
118118
}

0 commit comments

Comments
 (0)