diff --git a/substrate/environmental/src/lib.rs b/substrate/environmental/src/lib.rs
index 00466c15b7ca7..f6f0e94c74522 100644
--- a/substrate/environmental/src/lib.rs
+++ b/substrate/environmental/src/lib.rs
@@ -33,7 +33,7 @@
//! fn main() {
//! // declare a stack variable of the same type as our global declaration.
//! let mut counter_value = 41u32;
-//! // call stuff, setting up our `counter` environment as a refrence to our counter_value var.
+//! // call stuff, setting up our `counter` environment as a reference to our counter_value var.
//! counter::using(&mut counter_value, stuff);
//! println!("The answer is {:?}", counter_value); // will print 42!
//! stuff(); // safe! doesn't do anything.
@@ -234,10 +234,11 @@ mod tests {
// declare a stack variable of the same type as our global declaration.
let mut local = 41u32;
- // call stuff, setting up our `counter` environment as a refrence to our local counter var.
+ // call stuff, setting up our `counter` environment as a reference to our local counter var.
counter::using(&mut local, stuff);
assert_eq!(local, 42);
stuff(); // safe! doesn't do anything.
+ assert_eq!(local, 42);
}
#[test]
@@ -280,6 +281,8 @@ mod tests {
assert_eq!(local, 42);
stuff(); // doesn't do anything.
+
+ assert_eq!(local, 42);
}
#[test]
diff --git a/substrate/state-db/src/lib.rs b/substrate/state-db/src/lib.rs
index 2874468314c84..34fae02b57d9f 100644
--- a/substrate/state-db/src/lib.rs
+++ b/substrate/state-db/src/lib.rs
@@ -15,7 +15,7 @@
// along with Substrate. If not, see .
//! State database maintenance. Handles finalization and pruning in the database. The input to
-//! this module is a `ChangeSet` which is basicall a list of key-value pairs (trie nodes) that
+//! this module is a `ChangeSet` which is basically a list of key-value pairs (trie nodes) that
//! were added or deleted during block execution.
//!
//! # Finalization.
@@ -94,7 +94,7 @@ impl fmt::Debug for Error {
pub struct ChangeSet {
/// Inserted nodes.
pub inserted: Vec<(H, DBValue)>,
- /// Delted nodes.
+ /// Deleted nodes.
pub deleted: Vec,
}
@@ -108,7 +108,7 @@ pub struct CommitSet {
pub meta: ChangeSet>,
}
-/// Pruning contraints. If none are specified pruning is
+/// Pruning constraints. If none are specified pruning is
#[derive(Default, Debug, Clone)]
pub struct Constraints {
/// Maximum blocks. Defaults to 0 when unspecified, effectively keeping only unfinalized states.
@@ -187,7 +187,7 @@ impl StateDbSync {
match self.mode {
PruningMode::ArchiveAll => {
changeset.deleted.clear();
- // write changes immediatelly
+ // write changes immediately
CommitSet {
data: changeset,
meta: Default::default(),