Skip to content

Commit 847c3a1

Browse files
Fix random clippy warning (#17010)
# Objective Follow-up to #16984 ## Solution Fix the lint ## Testing ``` PS C:\Users\BenjaminBrienen\source\bevy> cargo clippy Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.71s PS C:\Users\BenjaminBrienen\source\bevy> cargo clippy -p bevy_ecs Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.21s ```
1 parent 97909df commit 847c3a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/bevy_ecs/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repository = "https://github.com/bevyengine/bevy"
88
license = "MIT OR Apache-2.0"
99
keywords = ["ecs", "game", "bevy"]
1010
categories = ["game-engines", "data-structures"]
11-
rust-version = "1.81.0"
11+
rust-version = "1.82.0"
1212

1313
[features]
1414
default = ["std", "bevy_reflect", "async_executor"]
@@ -84,7 +84,7 @@ critical-section = [
8484
]
8585

8686
## `portable-atomic` provides additional platform support for atomic types and
87-
## operations, even on targets without native support.
87+
## operations, even on targets without native support.
8888
portable-atomic = [
8989
"dep:portable-atomic",
9090
"dep:portable-atomic-util",

crates/bevy_ecs/src/entity/clone_entities.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ impl<'a, 'b> ComponentCloneCtx<'a, 'b> {
147147
if self.target_component_written {
148148
panic!("Trying to write component '{short_name}' multiple times")
149149
}
150-
if !self
150+
if self
151151
.component_info
152152
.type_id()
153-
.is_some_and(|id| id == TypeId::of::<T>())
153+
.is_none_or(|id| id != TypeId::of::<T>())
154154
{
155155
panic!("TypeId of component '{short_name}' does not match source component TypeId")
156156
};

0 commit comments

Comments
 (0)