From 0cf59d78bda1669226f861e438d43a08b099d747 Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Tue, 3 Nov 2020 14:43:21 +0100 Subject: Implement Clone for everything that can be cloned. --- src/geometry/proximity.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/geometry/proximity.rs') diff --git a/src/geometry/proximity.rs b/src/geometry/proximity.rs index 88e6e76..d3e0dc4 100644 --- a/src/geometry/proximity.rs +++ b/src/geometry/proximity.rs @@ -15,6 +15,18 @@ pub struct ProximityPair { pub(crate) detector_workspace: Option>, } +// TODO: use the `derive(Clone)` instead? +impl Clone for ProximityPair { + fn clone(&self) -> Self { + ProximityPair { + pair: self.pair.clone(), + proximity: self.proximity.clone(), + detector: None, + detector_workspace: None, + } + } +} + impl ProximityPair { pub(crate) fn new( pair: ColliderPair, -- cgit