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:
Tobin C. Harding 2024-09-03 10:56:06 +10:00
parent 1fde868f51
commit bb3a3ecbaa
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 3 additions and 0 deletions

View File

@ -946,6 +946,8 @@ impl Version {
pub const TWO: Self = Self(2);
}
mod tmp {
use super::*;
impl Version {
/// Creates a non-standard transaction 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.
pub fn is_standard(&self) -> bool { *self == Version::ONE || *self == Version::TWO }
}
}
impl Encodable for Version {
fn consensus_encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<usize, io::Error> {