mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
clippy: Fix warnings in shared
and config
, fonts
, layout
, and layout_2020
components (#32674)
This commit is contained in:
parent
99c1f886b8
commit
4b63043c6a
20 changed files with 72 additions and 78 deletions
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::convert::TryInto;
|
||||
use std::fmt;
|
||||
use std::str::FromStr;
|
||||
use std::sync::RwLock;
|
||||
|
@ -158,10 +157,7 @@ impl From<PrefValue> for [f64; 4] {
|
|||
fn from(other: PrefValue) -> [f64; 4] {
|
||||
match other {
|
||||
PrefValue::Array(values) if values.len() == 4 => {
|
||||
let f = values
|
||||
.into_iter()
|
||||
.filter_map(|v| v.try_into().ok())
|
||||
.collect::<Vec<f64>>();
|
||||
let f = values.into_iter().map(Into::into).collect::<Vec<f64>>();
|
||||
if f.len() == 4 {
|
||||
[f[0], f[1], f[2], f[3]]
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue