Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
ink
Commits
db766e2c
Commit
db766e2c
authored
Jul 14, 2019
by
Black3HDF
Committed by
Hero Bird
Jul 14, 2019
Browse files
[core] minor documentation improvements (#142)
* fix BitBlock number * fix typos
parent
a77e9d38
Changes
7
Hide whitespace changes
Inline
Side-by-side
core/src/env/test_env.rs
View file @
db766e2c
...
...
@@ -402,7 +402,7 @@ thread_local! {
/// The test environment data.
///
/// This needs to be thread local since tests are run
/// in paral
e
ll by default which may lead to data races otherwise.
/// in parall
e
l by default which may lead to data races otherwise.
pub
static
TEST_ENV_DATA
:
RefCell
<
TestEnvData
>
=
{
RefCell
::
new
(
TestEnvData
::
default
())
};
...
...
core/src/storage/cell/raw_cell.rs
View file @
db766e2c
...
...
@@ -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 con
s
tract 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
<
()
>
,
...
...
core/src/storage/cell/sync_cell.rs
View file @
db766e2c
...
...
@@ -31,7 +31,7 @@ use core::cell::RefCell;
/// A synchronized cell.
///
/// Provides interpreted, read-optimized and inplace-mutable
/// access to the associated con
s
tract storage slot.
/// access to the associated contract storage slot.
///
/// # Guarantees
///
...
...
core/src/storage/chunk/raw_chunk.rs
View file @
db766e2c
...
...
@@ -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 con
s
tract 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 un
t
erlying key to the cells.
/// Returns the un
d
erlying key to the cells.
///
/// # Note
///
...
...
core/src/storage/chunk/sync_chunk/chunk.rs
View file @
db766e2c
...
...
@@ -27,7 +27,7 @@ use crate::storage::{
/// A chunk of synchronized cells.
///
/// Provides mutable and read-optimized access to the associated con
s
tract storage slot.
/// Provides mutable and read-optimized access to the associated contract storage slot.
///
/// # Guarantees
///
...
...
core/src/storage/collections/bitvec/mod.rs
View file @
db766e2c
...
...
@@ -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.
...
...
core/src/storage/mod.rs
View file @
db766e2c
...
...
@@ -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 unneces
s
ary 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 con
s
tract 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.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment