Don't return a JS<T> from bound_texture_for/

It's never correct to return a JS<T>.  Maybe the lint should catch this?
This commit is contained in:
Eli Friedman 2015-10-14 16:26:27 -07:00
parent 88a1cbb28b
commit 2d3c3ece97

View file

@ -149,8 +149,8 @@ impl WebGLRenderingContext {
pub fn bound_texture_for(&self, target: u32) -> Option<Root<WebGLTexture>> {
match target {
constants::TEXTURE_2D => self.bound_texture_2d.get().map(|t| t.root()),
constants::TEXTURE_CUBE_MAP => self.bound_texture_cube_map.get().map(|t| t.root()),
constants::TEXTURE_2D => self.bound_texture_2d.get_rooted(),
constants::TEXTURE_CUBE_MAP => self.bound_texture_cube_map.get_rooted(),
_ => unreachable!(),
}