Skip to content

Commit ab01abd

Browse files
committed
clippy
1 parent 01d128d commit ab01abd

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

crates/bevy_asset/src/io/source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use bevy_ecs::resource::Resource;
1212
use bevy_platform::collections::HashMap;
1313
use core::{fmt::Display, hash::Hash, time::Duration};
1414
use thiserror::Error;
15-
use tracing::{error, warn};
15+
use tracing::warn;
1616

1717
use super::{ErasedAssetReader, ErasedAssetWriter};
1818

crates/bevy_ecs/src/schedule/schedule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use core::{
1717
fmt::{Debug, Write},
1818
};
1919
use fixedbitset::FixedBitSet;
20-
use log::{error, info, warn};
20+
use log::{info, warn};
2121
use pass::ScheduleBuildPassObj;
2222
use thiserror::Error;
2323
#[cfg(feature = "trace")]

crates/bevy_image/src/dynamic_texture_atlas_builder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use bevy_asset::RenderAssetUsages;
33
use bevy_math::{URect, UVec2};
44
use guillotiere::{size2, Allocation, AtlasAllocator};
55
use thiserror::Error;
6-
use tracing::error;
76

87
/// An error produced by [`DynamicTextureAtlasBuilder`] when trying to add a new
98
/// texture to a [`TextureAtlasLayout`].

crates/bevy_render/src/view/window/screenshot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,8 @@ pub(crate) fn collect_screenshots(world: &mut World) {
644644
// The polling for this map call is done every frame when the command queue is submitted.
645645
buffer_slice.map_async(wgpu::MapMode::Read, move |result| {
646646
let err = result.err();
647-
if err.is_some() {
648-
panic!("{}", err.unwrap().to_string());
647+
if let Some(e) = err {
648+
panic!("{}", e.to_string());
649649
}
650650
tx.try_send(()).unwrap();
651651
});

crates/bevy_shader/src/shader_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bevy_platform::collections::{hash_map::EntryRef, HashMap, HashSet};
55
use core::hash::Hash;
66
use naga::valid::Capabilities;
77
use thiserror::Error;
8-
use tracing::{debug, error};
8+
use tracing::debug;
99
use wgpu_types::{DownlevelFlags, Features};
1010

1111
/// Source of a shader module.

0 commit comments

Comments
 (0)