diff --git a/rust/src/boid/boid_2d.rs b/rust/src/boid/boid_2d.rs index aedb366..c210417 100644 --- a/rust/src/boid/boid_2d.rs +++ b/rust/src/boid/boid_2d.rs @@ -73,8 +73,7 @@ impl INode2D for Boid2D { } fn exit_tree(&mut self) { - let mut flock: Gd = - Gd::from_instance_id(self.get_flock_id()); + let mut flock: Gd = Gd::from_instance_id(self.get_flock_id()); flock.bind_mut().unregister_boid(self.get_id()); } } diff --git a/rust/src/boid/boid_3d.rs b/rust/src/boid/boid_3d.rs index 516ed67..e966dc2 100644 --- a/rust/src/boid/boid_3d.rs +++ b/rust/src/boid/boid_3d.rs @@ -44,7 +44,8 @@ impl Boid3D { #[inline(always)] /// Get the flock ID of this boid. pub fn get_flock_id(&self) -> InstanceId { - self.flock_id.expect("no flock id found set... this is a bug!") + self.flock_id + .expect("no flock id found set... this is a bug!") } } @@ -72,8 +73,7 @@ impl INode3D for Boid3D { } fn exit_tree(&mut self) { - let mut flock: Gd = - Gd::from_instance_id(self.get_flock_id()); + let mut flock: Gd = Gd::from_instance_id(self.get_flock_id()); flock.bind_mut().unregister_boid(self.get_id()); } } diff --git a/rust/src/flock/mod.rs b/rust/src/flock/mod.rs index 89cab57..847735d 100644 --- a/rust/src/flock/mod.rs +++ b/rust/src/flock/mod.rs @@ -3,13 +3,13 @@ use godot::prelude::*; use crate::BoidProperties; -pub mod flock_properties; pub mod flock_2d; pub mod flock_3d; +pub mod flock_properties; -pub use flock_properties::*; pub use flock_2d::*; pub use flock_3d::*; +pub use flock_properties::*; pub trait Flock { fn get_flock_properties(&self) -> &FlockProperties; diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 9b71e07..cc1ee0d 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -12,8 +12,8 @@ use rayon::prelude::*; mod boid; mod flock; -pub use boid::{*, Boid}; -pub use flock::{*, Flock}; +pub use boid::{Boid, *}; +pub use flock::{Flock, *}; use rustc_hash::FxBuildHasher; @@ -226,8 +226,10 @@ const fn to_glam_vec(godot_vec: Vector3) -> Vec3 { } #[inline(always)] -fn process_boids(boids: &mut FxIndexMap>, flocks: &FxIndexMap>) -where +fn process_boids( + boids: &mut FxIndexMap>, + flocks: &FxIndexMap>, +) where F: Flock + GodotClass, F: Bounds, B: Boid + GodotClass,