aboutsummaryrefslogtreecommitdiff
path: root/src/data
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-11-03 14:29:47 +0100
committerCrozet Sébastien <developer@crozet.re>2020-11-03 14:29:47 +0100
commit036a24614171eff0f99495b8b6f1c09e58cb4f9a (patch)
tree65ab16c69b8f7d7d8ade0163a13979c79afdcbf2 /src/data
parent0cc850dc505a4034103d229fdce22f9ec7bc410a (diff)
downloadrapier-036a24614171eff0f99495b8b6f1c09e58cb4f9a.tar.gz
rapier-036a24614171eff0f99495b8b6f1c09e58cb4f9a.tar.bz2
rapier-036a24614171eff0f99495b8b6f1c09e58cb4f9a.zip
Make cloning rigid-bodies and colliders more idiomatic.
Fix #53
Diffstat (limited to 'src/data')
-rw-r--r--src/data/graph.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/data/graph.rs b/src/data/graph.rs
index ea27e03..de958c3 100644
--- a/src/data/graph.rs
+++ b/src/data/graph.rs
@@ -749,20 +749,12 @@ impl<N, E> IndexMut<EdgeIndex> for Graph<N, E> {
/// The walker does not borrow from the graph, so it lets you step through
/// neighbors or incident edges while also mutating graph weights, as
/// in the following example:
+#[derive(Clone)]
pub struct WalkNeighbors {
skip_start: NodeIndex,
next: [EdgeIndex; 2],
}
-impl Clone for WalkNeighbors {
- fn clone(&self) -> Self {
- WalkNeighbors {
- skip_start: self.skip_start,
- next: self.next,
- }
- }
-}
-
/// Reference to a `Graph` edge.
#[derive(Debug)]
pub struct EdgeReference<'a, E: 'a> {