Navigation Menu

Skip to content

Commit

Permalink
NonNull::new()
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Jan 4, 2019
1 parent cfa5397 commit 4d73eac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/script/dom/xrview.rs
Expand Up @@ -72,12 +72,12 @@ impl XRViewMethods for XRView {
#[allow(unsafe_code)]
/// https://immersive-web.github.io/webxr/#dom-xrview-projectionmatrix
unsafe fn ProjectionMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> {
NonNull::new_unchecked(self.proj.get())
NonNull::new(self.proj.get()).unwrap()
}

#[allow(unsafe_code)]
/// https://immersive-web.github.io/webxr/#dom-xrview-projectionmatrix
unsafe fn ViewMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> {
NonNull::new_unchecked(self.view.get())
NonNull::new(self.view.get()).unwrap()
}
}

0 comments on commit 4d73eac

Please sign in to comment.