clippy
This commit is contained in:
@@ -73,8 +73,8 @@ impl OpenXrInputSource {
|
||||
Ok(Self {
|
||||
action_set,
|
||||
hands: [
|
||||
OpenXrHand::new(&xr, left_source)?,
|
||||
OpenXrHand::new(&xr, right_source)?,
|
||||
OpenXrHand::new(xr, left_source)?,
|
||||
OpenXrHand::new(xr, right_source)?,
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
@@ -94,14 +94,14 @@ impl LinePool {
|
||||
|
||||
debug_assert!(color < self.colors.len());
|
||||
|
||||
let Some(line) = self.lines.get_mut(&id) else {
|
||||
let Some(line) = self.lines.get_mut(id) else {
|
||||
log::warn!("Line {} not found", id);
|
||||
return;
|
||||
};
|
||||
|
||||
let rotation = Affine3A::from_axis_angle(Vec3::X, PI * 1.5);
|
||||
|
||||
from.translation = from.translation + from.transform_vector3a(Vec3A::NEG_Z) * (len * 0.5);
|
||||
from.translation += from.transform_vector3a(Vec3A::NEG_Z) * (len * 0.5);
|
||||
let mut transform = from * rotation;
|
||||
|
||||
let to_hmd = hmd.translation - from.translation;
|
||||
@@ -120,7 +120,7 @@ impl LinePool {
|
||||
}
|
||||
}
|
||||
|
||||
transform = transform * rotations[closest.0];
|
||||
transform *= rotations[closest.0];
|
||||
|
||||
let posef = helpers::transform_to_posef(&transform);
|
||||
|
||||
|
||||
@@ -221,11 +221,8 @@ pub fn openxr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
|
||||
.input_state
|
||||
.pointers
|
||||
.iter()
|
||||
.any(|p| p.now.show_hide && !p.before.show_hide)
|
||||
{
|
||||
if show_hide_counter.click() {
|
||||
overlays.show_hide(&mut app_state);
|
||||
}
|
||||
.any(|p| p.now.show_hide && !p.before.show_hide) && show_hide_counter.click() {
|
||||
overlays.show_hide(&mut app_state);
|
||||
}
|
||||
|
||||
watch_fade(&mut app_state, overlays.mut_by_id(watch_id).unwrap()); // want panic
|
||||
|
||||
Reference in New Issue
Block a user