fix: replace unused variable with underscore and fix raw pointer mutation errors
This commit is contained in:
@@ -254,7 +254,7 @@ fn main() {
|
||||
// Instantiate multiple helicopters
|
||||
let heli_count = 5;
|
||||
let mut heli_roots = Vec::new();
|
||||
for i in 0..heli_count {
|
||||
for _ in 0..heli_count {
|
||||
let mut root = SceneNode::new();
|
||||
let body_node = SceneNode::from_vao(heli_body_vao, helicopter.body.index_count);
|
||||
let door_node = SceneNode::from_vao(heli_door_vao, helicopter.door.index_count);
|
||||
@@ -470,8 +470,8 @@ fn main() {
|
||||
let mut pin = root.as_mut();
|
||||
let node = unsafe { pin.get_unchecked_mut() };
|
||||
unsafe {
|
||||
(*node.children[2]).rotation.y = elapsed * 10.0;
|
||||
(*node.children[3]).rotation.x = elapsed * 10.0;
|
||||
(&mut (*node.children[2]).rotation).y = elapsed * 10.0;
|
||||
(&mut (*node.children[3]).rotation).x = elapsed * 10.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user