Skip to content

Commit

Permalink
Fix random clippy warning (bevyengine#17010)
Browse files Browse the repository at this point in the history
# Objective

Follow-up to bevyengine#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
```
  • Loading branch information
BenjaminBrienen authored and ecoskey committed Jan 6, 2025
1 parent fc94c54 commit a8f6a65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/bevyengine/bevy"
license = "MIT OR Apache-2.0"
keywords = ["ecs", "game", "bevy"]
categories = ["game-engines", "data-structures"]
rust-version = "1.81.0"
rust-version = "1.82.0"

[features]
default = ["std", "bevy_reflect", "async_executor"]
Expand Down Expand Up @@ -84,7 +84,7 @@ critical-section = [
]

## `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 = [
"dep:portable-atomic",
"dep:portable-atomic-util",
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/entity/clone_entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ impl<'a, 'b> ComponentCloneCtx<'a, 'b> {
if self.target_component_written {
panic!("Trying to write component '{short_name}' multiple times")
}
if !self
if self
.component_info
.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")
};
Expand Down

0 comments on commit a8f6a65

Please sign in to comment.