Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit e6bf0c7

Browse files
Guanqun Lugavofyork
authored andcommitted
random fixes (#638)
1 parent d5a4379 commit e6bf0c7

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

substrate/environmental/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
//! fn main() {
3434
//! // declare a stack variable of the same type as our global declaration.
3535
//! let mut counter_value = 41u32;
36-
//! // call stuff, setting up our `counter` environment as a refrence to our counter_value var.
36+
//! // call stuff, setting up our `counter` environment as a reference to our counter_value var.
3737
//! counter::using(&mut counter_value, stuff);
3838
//! println!("The answer is {:?}", counter_value); // will print 42!
3939
//! stuff(); // safe! doesn't do anything.
@@ -234,10 +234,11 @@ mod tests {
234234
// declare a stack variable of the same type as our global declaration.
235235
let mut local = 41u32;
236236

237-
// call stuff, setting up our `counter` environment as a refrence to our local counter var.
237+
// call stuff, setting up our `counter` environment as a reference to our local counter var.
238238
counter::using(&mut local, stuff);
239239
assert_eq!(local, 42);
240240
stuff(); // safe! doesn't do anything.
241+
assert_eq!(local, 42);
241242
}
242243

243244
#[test]
@@ -280,6 +281,8 @@ mod tests {
280281
assert_eq!(local, 42);
281282

282283
stuff(); // doesn't do anything.
284+
285+
assert_eq!(local, 42);
283286
}
284287

285288
#[test]

substrate/state-db/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
1616

1717
//! State database maintenance. Handles finalization and pruning in the database. The input to
18-
//! this module is a `ChangeSet` which is basicall a list of key-value pairs (trie nodes) that
18+
//! this module is a `ChangeSet` which is basically a list of key-value pairs (trie nodes) that
1919
//! were added or deleted during block execution.
2020
//!
2121
//! # Finalization.
@@ -94,7 +94,7 @@ impl<E: fmt::Debug> fmt::Debug for Error<E> {
9494
pub struct ChangeSet<H: Hash> {
9595
/// Inserted nodes.
9696
pub inserted: Vec<(H, DBValue)>,
97-
/// Delted nodes.
97+
/// Deleted nodes.
9898
pub deleted: Vec<H>,
9999
}
100100

@@ -108,7 +108,7 @@ pub struct CommitSet<H: Hash> {
108108
pub meta: ChangeSet<Vec<u8>>,
109109
}
110110

111-
/// Pruning contraints. If none are specified pruning is
111+
/// Pruning constraints. If none are specified pruning is
112112
#[derive(Default, Debug, Clone)]
113113
pub struct Constraints {
114114
/// Maximum blocks. Defaults to 0 when unspecified, effectively keeping only unfinalized states.
@@ -187,7 +187,7 @@ impl<BlockHash: Hash, Key: Hash> StateDbSync<BlockHash, Key> {
187187
match self.mode {
188188
PruningMode::ArchiveAll => {
189189
changeset.deleted.clear();
190-
// write changes immediatelly
190+
// write changes immediately
191191
CommitSet {
192192
data: changeset,
193193
meta: Default::default(),

0 commit comments

Comments
 (0)