From 0c09452cbd8b365b528162861da9b7aaf56756be Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Wed, 8 Aug 2018 16:29:06 +0800 Subject: [PATCH 1/3] random typo fixes --- substrate/client/db/src/utils.rs | 2 +- substrate/network/src/service.rs | 2 +- substrate/primitives/src/hexdisplay.rs | 4 ++-- substrate/primitives/src/sandbox.rs | 2 +- substrate/state-db/src/lib.rs | 1 - 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/substrate/client/db/src/utils.rs b/substrate/client/db/src/utils.rs index 75c86ae06e151..ea5a8f2e77a27 100644 --- a/substrate/client/db/src/utils.rs +++ b/substrate/client/db/src/utils.rs @@ -32,7 +32,7 @@ use DatabaseSettings; /// Number of columns in the db. Must be the same for both full && light dbs. /// Otherwise RocksDb will fail to open database && check its type. pub const NUM_COLUMNS: u32 = 7; -/// Meta column. Thes set of keys in the column is shared by full && light storages. +/// Meta column. The set of keys in the column is shared by full && light storages. pub const COLUMN_META: Option = Some(0); /// Keys of entries in COLUMN_META. diff --git a/substrate/network/src/service.rs b/substrate/network/src/service.rs index 58189bde19d65..dfcff2a62c403 100644 --- a/substrate/network/src/service.rs +++ b/substrate/network/src/service.rs @@ -85,7 +85,7 @@ pub trait SyncProvider: Send + Sync { pub trait TransactionPool: Send + Sync { /// Get transactions from the pool that are ready to be propagated. fn transactions(&self) -> Vec<(B::Hash, B::Extrinsic)>; - /// Import a transction into the pool. + /// Import a transaction into the pool. fn import(&self, transaction: &B::Extrinsic) -> Option; /// Notify the pool about transactions broadcast. fn on_broadcasted(&self, propagations: HashMap>); diff --git a/substrate/primitives/src/hexdisplay.rs b/substrate/primitives/src/hexdisplay.rs index b1746727aed04..01e74bd2521cb 100644 --- a/substrate/primitives/src/hexdisplay.rs +++ b/substrate/primitives/src/hexdisplay.rs @@ -43,9 +43,9 @@ impl<'a> ::core::fmt::Display for HexDisplay<'a> { } } -/// Simple trait to transferm various types to `&[u8]` +/// Simple trait to transform various types to `&[u8]` pub trait AsBytesRef { - /// Transferm `self` into `&[u8]`. + /// Transform `self` into `&[u8]`. fn as_bytes_ref(&self) -> &[u8]; } diff --git a/substrate/primitives/src/sandbox.rs b/substrate/primitives/src/sandbox.rs index 9ee2c76381854..d69dfbc8979da 100644 --- a/substrate/primitives/src/sandbox.rs +++ b/substrate/primitives/src/sandbox.rs @@ -176,7 +176,7 @@ pub const ERR_MODULE: u32 = -1i32 as u32; /// For FFI purposes. pub const ERR_OUT_OF_BOUNDS: u32 = -2i32 as u32; -/// Execution error occured (typically trap). +/// Execution error occurred (typically trap). /// /// For FFI purposes. pub const ERR_EXECUTION: u32 = -3i32 as u32; diff --git a/substrate/state-db/src/lib.rs b/substrate/state-db/src/lib.rs index 00211f9ffcb19..cb1e2f967e433 100644 --- a/substrate/state-db/src/lib.rs +++ b/substrate/state-db/src/lib.rs @@ -72,7 +72,6 @@ pub trait HashDb { fn get(&self, key: &Self::Hash) -> Result, Self::Error>; } -/// Error type. /// Error type. pub enum Error { /// Database backend error. From 8c033f1cb96844c447112ea224d1c18dc839efba Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Wed, 8 Aug 2018 16:41:34 +0800 Subject: [PATCH 2/3] typo --- substrate/primitives/src/sandbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/primitives/src/sandbox.rs b/substrate/primitives/src/sandbox.rs index d69dfbc8979da..2e3144b24ff25 100644 --- a/substrate/primitives/src/sandbox.rs +++ b/substrate/primitives/src/sandbox.rs @@ -152,7 +152,7 @@ pub struct Entry { #[derive(Clone, PartialEq, Eq, Encode, Decode)] #[cfg_attr(feature = "std", derive(Debug))] pub struct EnvironmentDefinition { - /// Vector of all entries in the environment defintion. + /// Vector of all entries in the environment definition. pub entries: Vec, } From 94813d99c0768c83e6fa344f6af8be9d6715070e Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Fri, 3 Aug 2018 16:12:32 +0800 Subject: [PATCH 3/3] typo fixes --- substrate/runtime/contract/src/double_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/runtime/contract/src/double_map.rs b/substrate/runtime/contract/src/double_map.rs index 7c4db02f35f3b..505fe9e6a29a0 100644 --- a/substrate/runtime/contract/src/double_map.rs +++ b/substrate/runtime/contract/src/double_map.rs @@ -57,7 +57,7 @@ fn full_key(k1: M::Key1, k2: M::Key2) -> Vec { /// The first part is a XX hash of a concatenation of the `PREFIX` and `Key1`. And the second part /// is a blake2 hash of a `Key2`. /// -/// Blake2 is used for `Key2` is because it will be used as a for a key for contract's storage and +/// Blake2 is used for `Key2` is because it will be used as a key for contract's storage and /// thus will be susceptible for a untrusted input. pub trait StorageDoubleMap { type Key1: Codec;