Skip to content

Commit 6a3f3aa

Browse files
committed
Inverse alternative formatting for LeafVersion type
1 parent bec6694 commit 6a3f3aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util/taproot.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,10 @@ impl LeafVersion {
849849
impl fmt::Display for LeafVersion {
850850
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
851851
match (self, f.alternate()) {
852-
(LeafVersion::TapScript, false) => f.write_str("tapscript"),
853-
(LeafVersion::TapScript, true) => fmt::Display::fmt(&TAPROOT_LEAF_TAPSCRIPT, f),
854-
(LeafVersion::Future(version), false) => write!(f, "future_script_{:#02x}", version.0),
855-
(LeafVersion::Future(version), true) => fmt::Display::fmt(version, f),
852+
(LeafVersion::TapScript, true) => f.write_str("tapscript"),
853+
(LeafVersion::TapScript, false) => fmt::Display::fmt(&TAPROOT_LEAF_TAPSCRIPT, f),
854+
(LeafVersion::Future(version), true) => write!(f, "future_script_{:#02x}", version.0),
855+
(LeafVersion::Future(version), false) => fmt::Display::fmt(version, f),
856856
}
857857
}
858858
}

0 commit comments

Comments
 (0)