Commit db766e2c authored by Black3HDF's avatar Black3HDF Committed by Hero Bird
Browse files

[core] minor documentation improvements (#142)

* fix BitBlock number

* fix typos
parent a77e9d38
......@@ -402,7 +402,7 @@ thread_local! {
/// The test environment data.
///
/// This needs to be thread local since tests are run
/// in paralell by default which may lead to data races otherwise.
/// in parallel by default which may lead to data races otherwise.
pub static TEST_ENV_DATA: RefCell<TestEnvData> = {
RefCell::new(TestEnvData::default())
};
......
......@@ -43,7 +43,7 @@ use parity_codec::{
/// Read more about kinds of guarantees and their effect [here](../index.html#guarantees).
#[derive(Debug, PartialEq, Eq, Hash, Encode, Decode)]
pub struct RawCell {
/// The key to the associated constract storage slot.
/// The key to the associated contract storage slot.
key: Key,
/// Marker that prevents this type from being `Copy` or `Clone` by accident.
non_clone: NonCloneMarker<()>,
......
......@@ -31,7 +31,7 @@ use core::cell::RefCell;
/// A synchronized cell.
///
/// Provides interpreted, read-optimized and inplace-mutable
/// access to the associated constract storage slot.
/// access to the associated contract storage slot.
///
/// # Guarantees
///
......
......@@ -39,7 +39,7 @@ use crate::{
/// Read more about kinds of guarantees and their effect [here](../index.html#guarantees).
#[derive(Debug, PartialEq, Eq)]
pub struct RawChunk {
/// The key to the associated constract storage slot.
/// The key to the associated contract storage slot.
key: Key,
/// Marker that prevents this type from being `Copy` or `Clone` by accident.
non_clone: NonCloneMarker<()>,
......@@ -115,7 +115,7 @@ impl RawChunk {
}
}
/// Returns the unterlying key to the cells.
/// Returns the underlying key to the cells.
///
/// # Note
///
......
......@@ -27,7 +27,7 @@ use crate::storage::{
/// A chunk of synchronized cells.
///
/// Provides mutable and read-optimized access to the associated constract storage slot.
/// Provides mutable and read-optimized access to the associated contract storage slot.
///
/// # Guarantees
///
......
......@@ -30,7 +30,7 @@
//! ```no-compile
//! | bit 0 | ... | bit 32 | ... | bit 0 | ... | bit 32 | bit 0 | ... | bit 32 | ... | bit 0 | ... | bit 32 |
//! | BitPack 0 | ... | BitPack 32 | BitPack 0 | ... | BitPack 32 |
//! | BitBlock 0 | BitBlock 0 |
//! | BitBlock 0 | BitBlock 1 |
//! ```
//!
//! The above pseudo code represents a [`BitVec`](struct.BitVec.html) with 1024 bits.
......
......@@ -24,7 +24,7 @@
//! |:-------------|:------------|
//! | `Owned` | Disallows aliasing between different kinds of these primitives. |
//! | `Typed` | Automatically encodes and decodes the stored entity. |
//! | `Opt. Reads` | Tries to avoid unnecesary reads to the storage. |
//! | `Opt. Reads` | Tries to avoid unnecessary reads to the storage. |
//! | `Mutable` | Allows inplace mutation of the stored entity. |
//! | `Safe Load` | Guarantees to always have a valid element stored in the associated contract storage slot. |
//!
......@@ -45,7 +45,7 @@
//!
//! ### Entities
//!
//! The highest-level abstraction concerning constract storage primitive.
//! The highest-level abstraction concerning contract storage primitive.
//!
//! They provide the most guarantees and should be preferred over the other
//! primitive types if possible.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment