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 ```
This commit is contained in:
parent
97909df6c0
commit
847c3a1719
@ -8,7 +8,7 @@ repository = "https://github.com/bevyengine/bevy"
|
|||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
keywords = ["ecs", "game", "bevy"]
|
keywords = ["ecs", "game", "bevy"]
|
||||||
categories = ["game-engines", "data-structures"]
|
categories = ["game-engines", "data-structures"]
|
||||||
rust-version = "1.81.0"
|
rust-version = "1.82.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std", "bevy_reflect", "async_executor"]
|
default = ["std", "bevy_reflect", "async_executor"]
|
||||||
@ -84,7 +84,7 @@ critical-section = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
## `portable-atomic` provides additional platform support for atomic types and
|
## `portable-atomic` provides additional platform support for atomic types and
|
||||||
## operations, even on targets without native support.
|
## operations, even on targets without native support.
|
||||||
portable-atomic = [
|
portable-atomic = [
|
||||||
"dep:portable-atomic",
|
"dep:portable-atomic",
|
||||||
"dep:portable-atomic-util",
|
"dep:portable-atomic-util",
|
||||||
|
|||||||
@ -147,10 +147,10 @@ impl<'a, 'b> ComponentCloneCtx<'a, 'b> {
|
|||||||
if self.target_component_written {
|
if self.target_component_written {
|
||||||
panic!("Trying to write component '{short_name}' multiple times")
|
panic!("Trying to write component '{short_name}' multiple times")
|
||||||
}
|
}
|
||||||
if !self
|
if self
|
||||||
.component_info
|
.component_info
|
||||||
.type_id()
|
.type_id()
|
||||||
.is_some_and(|id| id == TypeId::of::<T>())
|
.is_none_or(|id| id != TypeId::of::<T>())
|
||||||
{
|
{
|
||||||
panic!("TypeId of component '{short_name}' does not match source component TypeId")
|
panic!("TypeId of component '{short_name}' does not match source component TypeId")
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user