mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 10:21:05 +00:00
Make use of NLL in client crate (#1436)
* fix: set edition to 2018 in Cargo.toml. * fix: refactor function to make use of NLL. * fix: result of applying 'cargo fix --edition' command. * fix: removes extern crate * fix: remove module uses from lib.rs * fix: tests imports
This commit is contained in:
committed by
Bastian Köcher
parent
f0b4c87eb5
commit
9151349b2d
@@ -19,20 +19,20 @@
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use parking_lot::RwLock;
|
||||
use error;
|
||||
use backend::{self, NewBlockState};
|
||||
use light;
|
||||
use crate::error;
|
||||
use crate::backend::{self, NewBlockState};
|
||||
use crate::light;
|
||||
use primitives::storage::well_known_keys;
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::traits::{Block as BlockT, Header as HeaderT, Zero,
|
||||
NumberFor, As, Digest, DigestItem, AuthorityIdFor};
|
||||
use runtime_primitives::{Justification, StorageMap, ChildrenStorageMap};
|
||||
use blockchain::{self, BlockStatus, HeaderBackend};
|
||||
use crate::blockchain::{self, BlockStatus, HeaderBackend};
|
||||
use state_machine::backend::{Backend as StateBackend, InMemory, Consolidate};
|
||||
use state_machine::InMemoryChangesTrieStorage;
|
||||
use hash_db::Hasher;
|
||||
use heapsize::HeapSizeOf;
|
||||
use leaves::LeafSet;
|
||||
use crate::leaves::LeafSet;
|
||||
use trie::MemoryDB;
|
||||
|
||||
struct PendingBlock<B: BlockT> {
|
||||
@@ -166,7 +166,7 @@ impl<Block: BlockT> Blockchain<Block> {
|
||||
justification: Option<Justification>,
|
||||
body: Option<Vec<<Block as BlockT>::Extrinsic>>,
|
||||
new_state: NewBlockState,
|
||||
) -> ::error::Result<()> {
|
||||
) -> crate::error::Result<()> {
|
||||
let number = header.number().clone();
|
||||
let best_tree_route = match new_state.is_best() {
|
||||
false => None,
|
||||
@@ -175,7 +175,7 @@ impl<Block: BlockT> Blockchain<Block> {
|
||||
if &best_hash == header.parent_hash() {
|
||||
None
|
||||
} else {
|
||||
let route = ::blockchain::tree_route(
|
||||
let route = crate::blockchain::tree_route(
|
||||
self,
|
||||
BlockId::Hash(best_hash),
|
||||
BlockId::Hash(*header.parent_hash()),
|
||||
|
||||
Reference in New Issue
Block a user