mirror of
https://github.com/servo/servo.git
synced 2025-06-18 13:24:29 +00:00
NonNull::new()
This commit is contained in:
parent
cfa539751c
commit
4d73eac27c
1 changed files with 2 additions and 2 deletions
|
@ -72,12 +72,12 @@ impl XRViewMethods for XRView {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
/// https://immersive-web.github.io/webxr/#dom-xrview-projectionmatrix
|
/// https://immersive-web.github.io/webxr/#dom-xrview-projectionmatrix
|
||||||
unsafe fn ProjectionMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> {
|
unsafe fn ProjectionMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> {
|
||||||
NonNull::new_unchecked(self.proj.get())
|
NonNull::new(self.proj.get()).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
/// https://immersive-web.github.io/webxr/#dom-xrview-projectionmatrix
|
/// https://immersive-web.github.io/webxr/#dom-xrview-projectionmatrix
|
||||||
unsafe fn ViewMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> {
|
unsafe fn ViewMatrix(&self, _cx: *mut JSContext) -> NonNull<JSObject> {
|
||||||
NonNull::new_unchecked(self.view.get())
|
NonNull::new(self.view.get()).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue