From 7aa94e994f27a27fb193cff9a13b2a3beae09a83 Mon Sep 17 00:00:00 2001 From: Jamen Marz Date: Tue, 21 Sep 2021 11:25:54 -0600 Subject: Impl Default for a few structs --- src/dynamics/solver/island_solver.rs | 6 ++++++ src/dynamics/solver/parallel_island_solver.rs | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'src/dynamics/solver') diff --git a/src/dynamics/solver/island_solver.rs b/src/dynamics/solver/island_solver.rs index 0c4c323..912fe1d 100644 --- a/src/dynamics/solver/island_solver.rs +++ b/src/dynamics/solver/island_solver.rs @@ -19,6 +19,12 @@ pub struct IslandSolver { position_solver: PositionSolver, } +impl Default for IslandSolver { + fn default() -> Self { + Self::new() + } +} + impl IslandSolver { pub fn new() -> Self { Self { diff --git a/src/dynamics/solver/parallel_island_solver.rs b/src/dynamics/solver/parallel_island_solver.rs index be7ea6d..bd6fc5d 100644 --- a/src/dynamics/solver/parallel_island_solver.rs +++ b/src/dynamics/solver/parallel_island_solver.rs @@ -133,6 +133,12 @@ pub struct ParallelIslandSolver { thread: ThreadContext, } +impl Default for ParallelIslandSolver { + fn default() -> Self { + Self::new() + } +} + impl ParallelIslandSolver { pub fn new() -> Self { Self { -- cgit