weight: Make docs uniform and terse
Make the docs use the same form as everywhere else, which also mimics stdlib docs on integer types.
This commit is contained in:
parent
63a09649f7
commit
f3412325ea
|
@ -43,11 +43,7 @@ impl Weight {
|
||||||
/// Constructs `Weight` from kilo weight units returning `None` if overflow occurred.
|
/// Constructs `Weight` from kilo weight units returning `None` if overflow occurred.
|
||||||
pub fn from_kwu(wu: u64) -> Option<Self> { wu.checked_mul(1000).map(Weight) }
|
pub fn from_kwu(wu: u64) -> Option<Self> { wu.checked_mul(1000).map(Weight) }
|
||||||
|
|
||||||
/// Constructs `Weight` from virtual bytes.
|
/// Constructs `Weight` from virtual bytes, returning `None` on overflow.
|
||||||
///
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// Returns `None` on overflow.
|
|
||||||
pub fn from_vb(vb: u64) -> Option<Self> { vb.checked_mul(4).map(Weight::from_wu) }
|
pub fn from_vb(vb: u64) -> Option<Self> { vb.checked_mul(4).map(Weight::from_wu) }
|
||||||
|
|
||||||
/// Constructs `Weight` from virtual bytes without overflow check.
|
/// Constructs `Weight` from virtual bytes without overflow check.
|
||||||
|
|
Loading…
Reference in New Issue