Make cloning rigid-bodies and colliders more idiomatic.

Fix #53
This commit is contained in:
Crozet Sébastien
2020-11-03 14:29:47 +01:00
parent 0cc850dc50
commit 036a246141
6 changed files with 29 additions and 38 deletions

View File

@@ -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> {