You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: this `map_or` is redundant
--> src/value/partial_eq.rs:5:5
|
5 | value.as_i64().map_or(false, |i| i == other)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(value.as_i64() == Some(other))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-W clippy::unnecessary-map-or` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
warning: this `map_or` is redundant
--> src/value/partial_eq.rs:9:5
|
9 | value.as_u64().map_or(false, |i| i == other)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(value.as_u64() == Some(other))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
warning: this `map_or` is redundant
--> src/value/partial_eq.rs:14:29
|
14 | Value::Number(n) => n.as_f32().map_or(false, |i| i == other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(n.as_f32() == Some(other))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
warning: this `map_or` is redundant
--> src/value/partial_eq.rs:20:5
|
20 | value.as_f64().map_or(false, |i| i == other)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(value.as_f64() == Some(other))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
warning: this `map_or` is redundant
--> src/value/partial_eq.rs:24:5
|
24 | value.as_bool().map_or(false, |i| i == other)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(value.as_bool() == Some(other))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
warning: this `map_or` is redundant
--> src/value/partial_eq.rs:28:5
|
28 | value.as_str().map_or(false, |i| i == other)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `(value.as_str() == Some(other))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
0 commit comments