Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Addressing Clippy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
porkbrain committed Mar 31, 2024
1 parent 5c8b24c commit 8e76357
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main_game_lib/src/rscn/spawner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ fn node_to_entity<T: TscnSpawner>(

// default zindex is 0 as per Godot, but we use f32::EPSILON to avoid z
// fighting between nested nodes (parent vs child)
let translation =
position.extend(virtual_z_index.unwrap_or_else(|| f32::EPSILON));
let translation = position.extend(virtual_z_index.unwrap_or(f32::EPSILON));
let transform = Transform::from_translation(translation);
cmd.entity(entity).insert(SpatialBundle {
transform,
Expand Down

0 comments on commit 8e76357

Please sign in to comment.