Add privacy boundary to BlockTime
As per policy in #4090 add a privacy boundary to the `BlockTime` type. Use the module name `encapsulate` as is done in `amount` - its private so the name can easily be changed later if needed. Explicitly do not run the formatter or update rustdoc column width so that review is easier.
This commit is contained in:
parent
b3dfe0df3f
commit
f7f1a0be8c
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#[cfg(feature = "arbitrary")]
|
#[cfg(feature = "arbitrary")]
|
||||||
use arbitrary::{Arbitrary, Unstructured};
|
use arbitrary::{Arbitrary, Unstructured};
|
||||||
|
|
||||||
|
mod encapsulate {
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
@ -37,6 +39,9 @@ impl BlockTime {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn to_u32(self) -> u32 { self.0 }
|
pub const fn to_u32(self) -> u32 { self.0 }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#[doc(inline)]
|
||||||
|
pub use encapsulate::BlockTime;
|
||||||
|
|
||||||
impl From<u32> for BlockTime {
|
impl From<u32> for BlockTime {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
Loading…
Reference in New Issue