From bb7dd2c479a629c8ebcea1eec0e34ea03cc2f485 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 16 Oct 2024 11:05:18 +1100 Subject: [PATCH] hashes: Move DISPLAY_BACKWARD to top of impl block There is no obvious reason why this const is further down the block, move it. Refactor only, no logic change. --- hashes/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs index c8ac1e2d3..8759693cd 100644 --- a/hashes/src/lib.rs +++ b/hashes/src/lib.rs @@ -265,15 +265,15 @@ pub trait Hash: /// Length of the hash, in bytes. const LEN: usize = Self::Bytes::LEN; + /// Flag indicating whether user-visible serializations of this hash should be backward. + /// + /// For some reason Satoshi decided this should be true for `Sha256dHash`, so here we are. + const DISPLAY_BACKWARD: bool = false; + /// Copies a byte slice into a hash object. #[deprecated(since = "TBD", note = "use `from_byte_array` instead")] fn from_slice(sl: &[u8]) -> Result; - /// Flag indicating whether user-visible serializations of this hash - /// should be backward. For some reason Satoshi decided this should be - /// true for `Sha256dHash`, so here we are. - const DISPLAY_BACKWARD: bool = false; - /// Returns the underlying byte array. fn to_byte_array(self) -> Self::Bytes;