mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: Fix many warnings in components/script
(#31717)
* Fix Several clippy warnings * Fix Build errors * Fix Unused import * Fix requested changes * Fix rustfmt * Minor fixes --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
676f655647
commit
01ca220f83
41 changed files with 200 additions and 212 deletions
|
@ -363,7 +363,7 @@ impl WebGLProgram {
|
|||
.active_attribs
|
||||
.borrow()
|
||||
.iter()
|
||||
.find(|attrib| attrib.name == &*name)
|
||||
.find(|attrib| attrib.name == *name)
|
||||
.map_or(-1, |attrib| attrib.location);
|
||||
Ok(location)
|
||||
}
|
||||
|
@ -478,7 +478,7 @@ impl WebGLProgram {
|
|||
|
||||
let validation_errors = names
|
||||
.iter()
|
||||
.map(|name| validate_glsl_name(&name))
|
||||
.map(|name| validate_glsl_name(name))
|
||||
.collect::<Vec<_>>();
|
||||
let first_validation_error = validation_errors.iter().find(|result| result.is_err());
|
||||
if let Some(error) = first_validation_error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue