"variable does not need to be mutable" compile warnings in components/script
Loirooriol opened this issue · comments
Oriol Brufau commented
After #31813, when compiling I get
warning: variable does not need to be mutable
--> components/script/dom/bindings/structuredclone.rs:58:5
|
58 | mut sc_holder: &mut StructuredDataHolder,
| ----^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: variable does not need to be mutable
--> components/script/dom/bindings/structuredclone.rs:169:13
|
169 | let mut sc_holder = &mut *(closure as *mut StructuredDataHolder);
| ----^^^^^^^^^
| |
| help: remove this `mut`
warning: variable does not need to be mutable
--> components/script/dom/bindings/structuredclone.rs:197:13
|
197 | let mut sc_holder = &mut *(closure as *mut StructuredDataHolder);
| ----^^^^^^^^^
| |
| help: remove this `mut`
warning: variable does not need to be mutable
--> components/script/dom/crypto.rs:54:17
|
54 | let mut data = unsafe { input.as_mut_slice() };
| ----^^^^
| |
| help: remove this `mut`
warning: variable does not need to be mutable
--> components/script/dom/cssstyledeclaration.rs:75:25
|
75 | let mut pdb = lock.write_with(&mut guard);
| ----^^^
| |
| help: remove this `mut`