Inherents and empty block production overhaul #240
Annotations
9 errors
cargo clippy:
core/src/inherents/providers.rs#L21
error: unused import: `cumulus_primitives_parachain_inherent::MessageQueueChain`
--> core/src/inherents/providers.rs:21:5
|
21 | use cumulus_primitives_parachain_inherent::MessageQueueChain;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
cargo clippy:
core/src/inherents/providers.rs#L29
error: unused imports: `H256`, `twox_128`
--> core/src/inherents/providers.rs:29:15
|
29 | use sp_core::{twox_128, H256};
| ^^^^^^^^ ^^^^
|
cargo clippy:
core/src/inherents/providers.rs#L37
error: unused import: `sp_timestamp::TimestampInherentData`
--> core/src/inherents/providers.rs:37:5
|
37 | use sp_timestamp::TimestampInherentData;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
cargo clippy:
core/src/inherents/custom_idps/para_parachain.rs#L9
error: function `is_parachain` is never used
--> core/src/inherents/custom_idps/para_parachain.rs:9:8
|
9 | pub fn is_parachain<B: BlockT>(ext: &mut TestExternalities<HashingFor<B>>) -> bool {
| ^^^^^^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
|
cargo clippy:
core/src/inherents/custom_idps/para_parachain.rs#L23
error: called `map(..).flatten()` on `Option`
--> core/src/inherents/custom_idps/para_parachain.rs:23:10
|
23 | .map(|b| -> Option<u32> { Decode::decode(&mut &b[..]).ok() })
| __________^
24 | | .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#L39
error: called `map(..).flatten()` on `Option`
--> core/src/inherents/custom_idps/para_parachain.rs:39:10
|
39 | .map(|b| -> Option<NumberFor<B>> { Decode::decode(&mut &b[..]).ok() })
| __________^
40 | | .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#L13
error: useless conversion to the same type: `sp_timestamp::Timestamp`
--> core/src/inherents/custom_idps/timestamp.rs:13:46
|
13 | Some((prev_inherent_data, _)) => sp_timestamp::InherentDataProvider::new(
| ______________________________________________^
14 | | prev_inherent_data
15 | | .timestamp_inherent_data()
16 | | .unwrap()
... |
20 | | .timestamp()
21 | | .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()`
|
13 ~ Some((prev_inherent_data, _)) => sp_timestamp::InherentDataProvider::new(
14 + prev_inherent_data
15 + .timestamp_inherent_data()
16 + .unwrap()
17 + .unwrap()
18 + + self.blocktime_millis,
19 + )
20 ~ .timestamp(),
|
|
cargo clippy:
core/src/inherents/custom_idps/timestamp.rs#L22
error: useless conversion to the same type: `sp_timestamp::Timestamp`
--> core/src/inherents/custom_idps/timestamp.rs:22:21
|
22 | None => sp_timestamp::InherentDataProvider::from_system_time()
| _____________________^
23 | | .timestamp()
24 | | .into(),
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
22 ~ None => sp_timestamp::InherentDataProvider::from_system_time()
23 ~ .timestamp(),
|
|
cargo clippy
Clippy had exited with the 101 exit code
|
Loading