Silence unused warnings

This commit is contained in:
Manish Goregaokar 2018-12-23 15:54:33 -08:00
parent feb2a2d3c9
commit c3b93a967d
5 changed files with 16 additions and 26 deletions

View file

@ -18,15 +18,13 @@ use crate::dom::xrview::XRView;
use crate::dom::xrviewport::XRViewport;
use dom_struct::dom_struct;
use std::cell::Cell;
#[dom_struct]
pub struct XRWebGLLayer {
xrlayer: XRLayer,
antialias: Cell<bool>,
depth: Cell<bool>,
stencil: Cell<bool>,
alpha: Cell<bool>,
antialias: bool,
depth: bool,
stencil: bool,
alpha: bool,
context: Dom<WebGLRenderingContext>,
session: Dom<XRSession>,
}
@ -39,10 +37,10 @@ impl XRWebGLLayer {
) -> XRWebGLLayer {
XRWebGLLayer {
xrlayer: XRLayer::new_inherited(),
antialias: Cell::new(init.antialias),
depth: Cell::new(init.depth),
stencil: Cell::new(init.stencil),
alpha: Cell::new(init.alpha),
antialias: init.antialias,
depth: init.depth,
stencil: init.stencil,
alpha: init.alpha,
context: Dom::from_ref(context),
session: Dom::from_ref(session),
}
@ -74,22 +72,22 @@ impl XRWebGLLayer {
impl XRWebGLLayerMethods for XRWebGLLayer {
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-depth
fn Depth(&self) -> bool {
self.depth.get()
self.depth
}
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-stencil
fn Stencil(&self) -> bool {
self.stencil.get()
self.stencil
}
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-antialias
fn Antialias(&self) -> bool {
self.antialias.get()
self.antialias
}
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-alpha
fn Alpha(&self) -> bool {
self.alpha.get()
self.alpha
}
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-context