aboutsummaryrefslogtreecommitdiffstats
path: root/components/config/pref_util.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-07-04 16:18:58 +0200
committerGitHub <noreply@github.com>2024-07-04 14:18:58 +0000
commit4b63043c6ae9ca9d51c6139101e294aaef379702 (patch)
treee88cdf1f58308a55dde90ab1d73f72752dcc0fa7 /components/config/pref_util.rs
parent99c1f886b8398e73e5af06135f6f357752e2cb16 (diff)
downloadservo-4b63043c6ae9ca9d51c6139101e294aaef379702.tar.gz
servo-4b63043c6ae9ca9d51c6139101e294aaef379702.zip
clippy: Fix warnings in `shared` and `config`, `fonts`, `layout`, and `layout_2020` components (#32674)
Diffstat (limited to 'components/config/pref_util.rs')
-rw-r--r--components/config/pref_util.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/components/config/pref_util.rs b/components/config/pref_util.rs
index c0def153d44..f79b0d7e22e 100644
--- a/components/config/pref_util.rs
+++ b/components/config/pref_util.rs
@@ -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 {