diff --git a/substrate/core/client/db/src/lib.rs b/substrate/core/client/db/src/lib.rs index e839998248..18c8d06e87 100644 --- a/substrate/core/client/db/src/lib.rs +++ b/substrate/core/client/db/src/lib.rs @@ -420,7 +420,7 @@ impl Backend { Ok(Backend { storage: Arc::new(storage_db), - tries_change_storage: tries_change_storage, + tries_change_storage, blockchain, canonicalization_delay, }) diff --git a/substrate/core/sr-primitives/src/generic/block.rs b/substrate/core/sr-primitives/src/generic/block.rs index 40538a392c..83ef73153a 100644 --- a/substrate/core/sr-primitives/src/generic/block.rs +++ b/substrate/core/sr-primitives/src/generic/block.rs @@ -52,7 +52,7 @@ impl Copy for BlockId {} #[cfg(feature = "std")] impl fmt::Display for BlockId { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) } } diff --git a/substrate/core/state-db/src/lib.rs b/substrate/core/state-db/src/lib.rs index 45a77d369d..d26fdf0ee3 100644 --- a/substrate/core/state-db/src/lib.rs +++ b/substrate/core/state-db/src/lib.rs @@ -21,9 +21,9 @@ //! //! # Canonicalization. //! Canonicalization window tracks a tree of blocks identified by header hash. The in-memory -//! overlay allows to get any node that was was inserted in any any of the blocks within the window. +//! overlay allows to get any node that was inserted in any of the blocks within the window. //! The tree is journaled to the backing database and rebuilt on startup. -//! Canonicalization function select one root from the top of the tree and discards all other roots and +//! Canonicalization function selects one root from the top of the tree and discards all other roots and //! their subtrees. //! //! # Pruning. @@ -83,7 +83,7 @@ pub enum Error { } impl fmt::Debug for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Error::Db(e) => e.fmt(f), Error::Decoding => write!(f, "Error decoding slicable value"), @@ -174,7 +174,7 @@ impl StateDbSync { Ok(StateDbSync { mode, non_canonical, - pruning: pruning, + pruning, pinned: Default::default(), }) } diff --git a/substrate/core/state-db/src/noncanonical.rs b/substrate/core/state-db/src/noncanonical.rs index b0afe0b2cc..7efa2b3b6b 100644 --- a/substrate/core/state-db/src/noncanonical.rs +++ b/substrate/core/state-db/src/noncanonical.rs @@ -103,7 +103,7 @@ impl NonCanonicalOverlay { trace!(target: "state-db", "Finished reading uncanonicalized journal, {} entries", total); } Ok(NonCanonicalOverlay { - last_canonicalized: last_canonicalized, + last_canonicalized, levels, parents, last_canonicalized_overlay: Default::default(), @@ -212,8 +212,8 @@ impl NonCanonicalOverlay { commit.data.inserted = self.last_canonicalized_overlay.iter().map(|(k, v)| (k.clone(), v.clone())).collect(); commit.data.deleted = overlay.deleted; } else { - // TODO: borrow checker won't allow us to split out mutable refernces - // required for recursive processing. A more efficient implementaion + // TODO: borrow checker won't allow us to split out mutable references + // required for recursive processing. A more efficient implementation // that does not require converting to vector is possible let mut vec: Vec<_> = self.levels.drain(..).collect(); Self::discard(&mut vec, &mut self.parents, &mut discarded_journals, 0, &overlay.hash); diff --git a/substrate/srml/balances/src/address.rs b/substrate/srml/balances/src/address.rs index 01fb254395..e50daaa6bc 100644 --- a/substrate/srml/balances/src/address.rs +++ b/substrate/srml/balances/src/address.rs @@ -40,7 +40,7 @@ impl fmt::Display for Address AccountId: Member, AccountIndex: Member, { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) } }