Inherents and empty block production overhaul #241
Annotations
5 errors
cargo clippy:
core/src/inherents/custom_idps/para_parachain.rs#L35
error: called `map(..).flatten()` on `Option`
--> core/src/inherents/custom_idps/para_parachain.rs:35:10
|
35 | .map(|b| -> Option<u32> { Decode::decode(&mut &b[..]).ok() })
| __________^
36 | | .flatten()
| |__________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|b| -> Option<u32> { Decode::decode(&mut &b[..]).ok() })`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `-D clippy::map-flatten` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::map_flatten)]`
|
cargo clippy:
core/src/inherents/custom_idps/para_parachain.rs#L51
error: called `map(..).flatten()` on `Option`
--> core/src/inherents/custom_idps/para_parachain.rs:51:10
|
51 | .map(|b| -> Option<NumberFor<B>> { Decode::decode(&mut &b[..]).ok() })
| __________^
52 | | .flatten()
| |__________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|b| -> Option<NumberFor<B>> { Decode::decode(&mut &b[..]).ok() })`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
cargo clippy:
core/src/inherents/custom_idps/timestamp.rs#L33
error: useless conversion to the same type: `sp_timestamp::Timestamp`
--> core/src/inherents/custom_idps/timestamp.rs:33:46
|
33 | Some((prev_inherent_data, _)) => sp_timestamp::InherentDataProvider::new(
| ______________________________________________^
34 | | prev_inherent_data
35 | | .timestamp_inherent_data()
36 | | .unwrap()
... |
40 | | .timestamp()
41 | | .into(),
| |___________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `-D clippy::useless-conversion` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]`
help: consider removing `.into()`
|
33 ~ Some((prev_inherent_data, _)) => sp_timestamp::InherentDataProvider::new(
34 + prev_inherent_data
35 + .timestamp_inherent_data()
36 + .unwrap()
37 + .unwrap()
38 + + self.blocktime_millis,
39 + )
40 ~ .timestamp(),
|
|
cargo clippy:
core/src/inherents/custom_idps/timestamp.rs#L42
error: useless conversion to the same type: `sp_timestamp::Timestamp`
--> core/src/inherents/custom_idps/timestamp.rs:42:21
|
42 | None => sp_timestamp::InherentDataProvider::from_system_time()
| _____________________^
43 | | .timestamp()
44 | | .into(),
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
42 ~ None => sp_timestamp::InherentDataProvider::from_system_time()
43 ~ .timestamp(),
|
|
cargo clippy
Clippy had exited with the 101 exit code
|
Loading