Skip to content

Commit

Permalink
refactor(client_openxr): ♻️ Remove some session.clone()s
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerp committed Sep 2, 2024
1 parent 92a5bba commit 85c0274
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl super::ExtraExtensions {

pub fn create_eye_tracker_social<G>(
&self,
session: xr::Session<G>,
session: &xr::Session<G>,
) -> Result<EyeTrackerSocial> {
let ext_fns = self.ext_functions_ptrs.fb_eye_tracking_social.to_any()?;

Expand Down
12 changes: 6 additions & 6 deletions alvr/client_openxr/src/interaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ pub fn initialize_interaction(
.unwrap();

let space = action
.create_space(&xr_ctx.session.clone(), xr::Path::NULL, xr::Posef::IDENTITY)
.create_space(&xr_ctx.session, xr::Path::NULL, xr::Posef::IDENTITY)
.unwrap();

(action, space)
Expand All @@ -290,17 +290,17 @@ pub fn initialize_interaction(
xr_ctx.session.attach_action_sets(&[&action_set]).unwrap();

let left_grip_space = left_grip_action
.create_space(&xr_ctx.session.clone(), xr::Path::NULL, xr::Posef::IDENTITY)
.create_space(&xr_ctx.session, xr::Path::NULL, xr::Posef::IDENTITY)
.unwrap();
let right_grip_space = right_grip_action
.create_space(&xr_ctx.session.clone(), xr::Path::NULL, xr::Posef::IDENTITY)
.create_space(&xr_ctx.session, xr::Path::NULL, xr::Posef::IDENTITY)
.unwrap();

let left_aim_space = left_aim_action
.create_space(&xr_ctx.session.clone(), xr::Path::NULL, xr::Posef::IDENTITY)
.create_space(&xr_ctx.session, xr::Path::NULL, xr::Posef::IDENTITY)
.unwrap();
let right_aim_space = right_aim_action
.create_space(&xr_ctx.session.clone(), xr::Path::NULL, xr::Posef::IDENTITY)
.create_space(&xr_ctx.session, xr::Path::NULL, xr::Posef::IDENTITY)
.unwrap();

let (left_hand_tracker, right_hand_tracker) =
Expand Down Expand Up @@ -328,7 +328,7 @@ pub fn initialize_interaction(
.then(|| {
xr_ctx
.extra_extensions
.create_eye_tracker_social(xr_ctx.session.clone())
.create_eye_tracker_social(&xr_ctx.session)
.unwrap()
});

Expand Down

0 comments on commit 85c0274

Please sign in to comment.