diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-01-23 18:04:24 +0100 |
|---|---|---|
| committer | Sébastien Crozet <developer@crozet.re> | 2022-01-23 18:04:24 +0100 |
| commit | 0c7ebae1aaae3ca2a55e33429a4466110deda208 (patch) | |
| tree | b2467543ba4610bc7d3e0902f6d45e3fb3823a01 /src | |
| parent | 536122e08066c762a0f6a1585c458f6c7a54bc2e (diff) | |
| download | rapier-0c7ebae1aaae3ca2a55e33429a4466110deda208.tar.gz rapier-0c7ebae1aaae3ca2a55e33429a4466110deda208.tar.bz2 rapier-0c7ebae1aaae3ca2a55e33429a4466110deda208.zip | |
Run cargo fmt
Diffstat (limited to 'src')
| -rw-r--r-- | src/data/arena.rs | 2 | ||||
| -rw-r--r-- | src/data/graph.rs | 2 | ||||
| -rw-r--r-- | src/dynamics/joint/fixed_joint.rs | 4 | ||||
| -rw-r--r-- | src/dynamics/joint/multibody_joint/multibody.rs | 4 | ||||
| -rw-r--r-- | src/dynamics/joint/spherical_joint.rs | 4 | ||||
| -rw-r--r-- | src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs | 5 | ||||
| -rw-r--r-- | src/geometry/broad_phase_multi_sap/broad_phase_pair_event.rs | 2 |
7 files changed, 14 insertions, 9 deletions
diff --git a/src/data/arena.rs b/src/data/arena.rs index d114339..00e3124 100644 --- a/src/data/arena.rs +++ b/src/data/arena.rs @@ -60,7 +60,7 @@ impl Default for Index { impl IndexedData for Index { fn default() -> Self { - Default::default() + Default::default() } fn index(&self) -> usize { diff --git a/src/data/graph.rs b/src/data/graph.rs index ea76bd9..dd2c760 100644 --- a/src/data/graph.rs +++ b/src/data/graph.rs @@ -125,7 +125,7 @@ impl<E> Edge<E> { } } -#[derive(Clone, Debug,Default)] +#[derive(Clone, Debug, Default)] #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] pub struct Graph<N, E> { pub(crate) nodes: Vec<Node<N>>, diff --git a/src/dynamics/joint/fixed_joint.rs b/src/dynamics/joint/fixed_joint.rs index 6082938..c7ca904 100644 --- a/src/dynamics/joint/fixed_joint.rs +++ b/src/dynamics/joint/fixed_joint.rs @@ -6,11 +6,13 @@ use crate::math::{Isometry, Point, Real}; pub struct FixedJoint { data: JointData, } -impl Default for FixedJoint{ + +impl Default for FixedJoint { fn default() -> Self { FixedJoint::new() } } + impl FixedJoint { pub fn new() -> Self { #[cfg(feature = "dim2")] diff --git a/src/dynamics/joint/multibody_joint/multibody.rs b/src/dynamics/joint/multibody_joint/multibody.rs index 5779b3e..f2fa623 100644 --- a/src/dynamics/joint/multibody_joint/multibody.rs +++ b/src/dynamics/joint/multibody_joint/multibody.rs @@ -18,7 +18,7 @@ use na::{ }; #[repr(C)] -#[derive(Copy, Clone, Debug,Default)] +#[derive(Copy, Clone, Debug, Default)] struct Force { linear: Vector<Real>, angular: AngVector<Real>, @@ -91,7 +91,7 @@ pub struct Multibody { coriolis_w: Vec<OMatrix<Real, AngDim, Dynamic>>, i_coriolis_dt: Jacobian<Real>, } -impl Default for Multibody{ +impl Default for Multibody { fn default() -> Self { Multibody::new() } diff --git a/src/dynamics/joint/spherical_joint.rs b/src/dynamics/joint/spherical_joint.rs index 19fbd6f..194682d 100644 --- a/src/dynamics/joint/spherical_joint.rs +++ b/src/dynamics/joint/spherical_joint.rs @@ -7,11 +7,13 @@ use crate::math::{Point, Real}; pub struct SphericalJoint { data: JointData, } -impl Default for SphericalJoint{ + +impl Default for SphericalJoint { fn default() -> Self { SphericalJoint::new() } } + impl SphericalJoint { pub fn new() -> Self { let data = diff --git a/src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs b/src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs index 795009f..be42b87 100644 --- a/src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs +++ b/src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs @@ -319,9 +319,10 @@ pub struct JointGenericVelocityGroundConstraint { pub writeback_id: WritebackId, } -impl Default for JointGenericVelocityGroundConstraint{ + +impl Default for JointGenericVelocityGroundConstraint { fn default() -> Self { - JointGenericVelocityGroundConstraint::invalid() + JointGenericVelocityGroundConstraint::invalid() } } diff --git a/src/geometry/broad_phase_multi_sap/broad_phase_pair_event.rs b/src/geometry/broad_phase_multi_sap/broad_phase_pair_event.rs index 99bab1e..7b489f5 100644 --- a/src/geometry/broad_phase_multi_sap/broad_phase_pair_event.rs +++ b/src/geometry/broad_phase_multi_sap/broad_phase_pair_event.rs @@ -33,7 +33,7 @@ impl ColliderPair { } } -impl Default for ColliderPair{ +impl Default for ColliderPair { fn default() -> Self { ColliderPair::zero() } |
