mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
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:
parent
88a1cbb28b
commit
2d3c3ece97
1 changed files with 2 additions and 2 deletions
|
@ -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!(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue