diff --git a/openxr/examples/vulkan.rs b/openxr/examples/vulkan.rs index e01c13b..bb3206a 100644 --- a/openxr/examples/vulkan.rs +++ b/openxr/examples/vulkan.rs @@ -382,10 +382,10 @@ pub fn main() { // Create an action space for each device we want to locate let right_space = right_action - .create_space(session.clone(), xr::Path::NULL, xr::Posef::IDENTITY) + .create_space(&session, xr::Path::NULL, xr::Posef::IDENTITY) .unwrap(); let left_space = left_action - .create_space(session.clone(), xr::Path::NULL, xr::Posef::IDENTITY) + .create_space(&session, xr::Path::NULL, xr::Posef::IDENTITY) .unwrap(); // OpenXR uses a couple different types of reference frames for positioning content; we need diff --git a/openxr/src/action.rs b/openxr/src/action.rs index 8699556..91d56cd 100644 --- a/openxr/src/action.rs +++ b/openxr/src/action.rs @@ -79,7 +79,7 @@ impl Action { /// Creates a `Space` relative to this action pub fn create_space( &self, - session: Session, + session: &Session, subaction_path: Path, pose_in_action_space: Posef, ) -> Result { @@ -97,7 +97,7 @@ impl Action { &info, &mut out, ))?; - Ok(Space::action_from_raw(self.clone(), session, out)) + Ok(Space::action_from_raw(self.clone(), session.clone(), out)) } }