aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/interaction_graph.rs
diff options
context:
space:
mode:
authorSébastien Crozet <sebcrozet@dimforge.com>2024-06-09 11:12:31 +0200
committerSébastien Crozet <sebastien@crozet.re>2024-06-09 12:09:58 +0200
commitad960bf2458bd907942b1f236438f42f3194a6f6 (patch)
treeedffab69df8c40a2f1767baed63c3c2545cf1eeb /src/geometry/interaction_graph.rs
parentedaa36ac7e702f419faab4ff1b9af858fc84177f (diff)
downloadrapier-ad960bf2458bd907942b1f236438f42f3194a6f6.tar.gz
rapier-ad960bf2458bd907942b1f236438f42f3194a6f6.tar.bz2
rapier-ad960bf2458bd907942b1f236438f42f3194a6f6.zip
chore: clippy fixes
Diffstat (limited to 'src/geometry/interaction_graph.rs')
-rw-r--r--src/geometry/interaction_graph.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/geometry/interaction_graph.rs b/src/geometry/interaction_graph.rs
index b535fa5..a237a69 100644
--- a/src/geometry/interaction_graph.rs
+++ b/src/geometry/interaction_graph.rs
@@ -232,7 +232,9 @@ impl<'a, N: Copy, E> Iterator for InteractionsWithMut<'a, N, E> {
let endpoints = self.graph.edge_endpoints(edge).unwrap();
let (co1, co2) = (self.graph[endpoints.0], self.graph[endpoints.1]);
let interaction = &mut self.graph[edge];
- return Some((co1, co2, edge, unsafe { std::mem::transmute(interaction) }));
+ return Some((co1, co2, edge, unsafe {
+ std::mem::transmute::<&mut E, &'a mut E>(interaction)
+ }));
}
let edge = self.outgoing_edge?;
@@ -240,6 +242,8 @@ impl<'a, N: Copy, E> Iterator for InteractionsWithMut<'a, N, E> {
let endpoints = self.graph.edge_endpoints(edge).unwrap();
let (co1, co2) = (self.graph[endpoints.0], self.graph[endpoints.1]);
let interaction = &mut self.graph[edge];
- Some((co1, co2, edge, unsafe { std::mem::transmute(interaction) }))
+ Some((co1, co2, edge, unsafe {
+ std::mem::transmute::<&mut E, &'a mut E>(interaction)
+ }))
}
}