2024-05-12 automated rustfmt nightly

This commit is contained in:
Fmt Bot 2024-05-12 01:05:51 +00:00 committed by github-actions[bot]
parent 89d6991cf1
commit 56b41cdf59
2 changed files with 5 additions and 5 deletions

View File

@ -118,9 +118,7 @@ pub fn decode_check(data: &str) -> Result<Vec<u8>, Error> {
} }
/// Encodes `data` as a base58 string (see also `base58::encode_check()`). /// Encodes `data` as a base58 string (see also `base58::encode_check()`).
pub fn encode(data: &[u8]) -> String { pub fn encode(data: &[u8]) -> String { encode_iter(data.iter().cloned()) }
encode_iter(data.iter().cloned())
}
/// Encodes `data` as a base58 string including the checksum. /// Encodes `data` as a base58 string including the checksum.
/// ///

View File

@ -176,10 +176,12 @@ mod tests {
// The digest created by sha256 hashing `&[0]` starting with `TEST_MIDSTATE`. // The digest created by sha256 hashing `&[0]` starting with `TEST_MIDSTATE`.
#[cfg(feature = "alloc")] #[cfg(feature = "alloc")]
const HASH_ZERO_BACKWARD: &str = "29589d5122ec666ab5b4695070b6debc63881a4f85d88d93ddc90078038213ed"; const HASH_ZERO_BACKWARD: &str =
"29589d5122ec666ab5b4695070b6debc63881a4f85d88d93ddc90078038213ed";
// And the same thing, forward. // And the same thing, forward.
#[cfg(feature = "alloc")] #[cfg(feature = "alloc")]
const HASH_ZERO_FORWARD: &str = "ed1382037800c9dd938dd8854f1a8863bcdeb6705069b4b56a66ec22519d5829"; const HASH_ZERO_FORWARD: &str =
"ed1382037800c9dd938dd8854f1a8863bcdeb6705069b4b56a66ec22519d5829";
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default, Hash)]
pub struct TestHashTag; pub struct TestHashTag;