Introduce temporary module for Version
In preparation for using the formatter to indent add a temporary module. Done as part of adding an extension trait.
This commit is contained in:
parent
1fde868f51
commit
bb3a3ecbaa
|
@ -946,6 +946,8 @@ impl Version {
|
||||||
pub const TWO: Self = Self(2);
|
pub const TWO: Self = Self(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod tmp {
|
||||||
|
use super::*;
|
||||||
impl Version {
|
impl Version {
|
||||||
/// Creates a non-standard transaction version.
|
/// Creates a non-standard transaction version.
|
||||||
pub fn non_standard(version: i32) -> Version { Self(version) }
|
pub fn non_standard(version: i32) -> Version { Self(version) }
|
||||||
|
@ -953,6 +955,7 @@ impl Version {
|
||||||
/// Returns true if this transaction version number is considered standard.
|
/// Returns true if this transaction version number is considered standard.
|
||||||
pub fn is_standard(&self) -> bool { *self == Version::ONE || *self == Version::TWO }
|
pub fn is_standard(&self) -> bool { *self == Version::ONE || *self == Version::TWO }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Encodable for Version {
|
impl Encodable for Version {
|
||||||
fn consensus_encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<usize, io::Error> {
|
fn consensus_encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<usize, io::Error> {
|
||||||
|
|
Loading…
Reference in New Issue