Remove some useless argument mutability

I wonder why this doesn't trigger a warning.
This commit is contained in:
Anthony Ramine 2018-09-09 01:23:03 +02:00
parent e61c7b757f
commit f726f18291

View file

@ -3450,7 +3450,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
border: i32, border: i32,
format: u32, format: u32,
data_type: u32, data_type: u32,
mut pixels: CustomAutoRooterGuard<Option<ArrayBufferView>>, pixels: CustomAutoRooterGuard<Option<ArrayBufferView>>,
) -> ErrorResult { ) -> ErrorResult {
if !self.extension_manager.is_tex_type_enabled(data_type) { if !self.extension_manager.is_tex_type_enabled(data_type) {
return Ok(self.webgl_error(InvalidEnum)); return Ok(self.webgl_error(InvalidEnum));
@ -3488,7 +3488,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// initialized to 0 is passed. // initialized to 0 is passed.
let buff = match *pixels { let buff = match *pixels {
None => vec![0u8; expected_byte_length as usize], None => vec![0u8; expected_byte_length as usize],
Some(ref mut data) => data.to_vec(), Some(ref data) => data.to_vec(),
}; };
// From the WebGL spec: // From the WebGL spec: