From 4be019180b279b1291fc1277555fed7821b12362 Mon Sep 17 00:00:00 2001 From: startup-dreamer Date: Fri, 26 May 2023 19:59:11 +0530 Subject: [PATCH] correcting formatting --- bitcoin/src/bip32.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bitcoin/src/bip32.rs b/bitcoin/src/bip32.rs index 31d7fce3..a451bf0b 100644 --- a/bitcoin/src/bip32.rs +++ b/bitcoin/src/bip32.rs @@ -8,9 +8,9 @@ use core::convert::TryInto; use core::default::Default; -use core::fmt; use core::ops::Index; use core::str::FromStr; +use core::{fmt, slice}; use hashes::{hex, sha512, Hash, HashEngine, Hmac, HmacEngine}; use internals::{impl_array_newtype, write_err}; @@ -209,6 +209,10 @@ impl FromStr for ChildNumber { } } +impl AsRef<[ChildNumber]> for ChildNumber { + fn as_ref(&self) -> &[ChildNumber] { slice::from_ref(self) } +} + #[cfg(feature = "serde")] impl<'de> serde::Deserialize<'de> for ChildNumber { fn deserialize(deserializer: D) -> Result @@ -563,7 +567,7 @@ impl ExtendedPrivKey { } /// Private->Private child key derivation - pub fn ckd_priv( + fn ckd_priv( &self, secp: &Secp256k1, i: ChildNumber,