From 877b14cd0aa2097f75f918800020cfcd44ff55f0 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 13 Oct 2024 17:46:09 +0200 Subject: [PATCH] chore: fix fmt with new style_edition fmt keeps changing all the time. Now they introduced new "editions" feature, which by default does a lot of changes to the codebase by mingling with alphabetical sorting of all imports, doing them in case-insentive way. This PR allows to avoid that dramatic changes --- .rustfmt.toml | 2 +- derive/src/xkey.rs | 4 ++-- psbt/src/data.rs | 6 +++--- src/signers.rs | 4 +++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.rustfmt.toml b/.rustfmt.toml index 98e9b85..5704008 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,5 +1,5 @@ edition = "2021" -version = "Two" +style_edition = "2021" max_width = 100 array_width = 100 diff --git a/derive/src/xkey.rs b/derive/src/xkey.rs index f067776..6b933e2 100644 --- a/derive/src/xkey.rs +++ b/derive/src/xkey.rs @@ -49,8 +49,8 @@ pub enum XkeyAccountError { /// information. DepthMismatch, - /// extended key child derivation index does not match the last derivation index in the provided - /// origin information. + /// extended key child derivation index does not match the last derivation index in the + /// provided origin information. ParentMismatch, /// extended key has derivation depth 1, but its parent fingerprint does not match the provided diff --git a/psbt/src/data.rs b/psbt/src/data.rs index c6d81f6..28e4a22 100644 --- a/psbt/src/data.rs +++ b/psbt/src/data.rs @@ -909,13 +909,13 @@ impl Input { self.redeem_script = None; // 0x04 self.witness_script = None; // 0x05 self.bip32_derivation.clear(); // 0x05 - // finalized witness 0x06 and 0x07 are not clear - // 0x09 Proof of reserves not yet supported + // finalized witness 0x06 and 0x07 are not clear + // 0x09 Proof of reserves not yet supported self.ripemd160.clear(); // 0x0a self.sha256.clear(); // 0x0b self.hash160.clear(); // 0x0c self.hash256.clear(); // 0x0d - // psbt v2 fields till 0x012 not supported + // psbt v2 fields till 0x012 not supported self.tap_key_sig = None; // 0x013 self.tap_script_sig.clear(); // 0x014 self.tap_leaf_script.clear(); // 0x015 diff --git a/src/signers.rs b/src/signers.rs index a310729..c8b898e 100644 --- a/src/signers.rs +++ b/src/signers.rs @@ -81,7 +81,9 @@ impl<'a> TestnetRefSigner<'a> { } impl<'a> Signer for TestnetRefSigner<'a> { - type Sign<'s> = Self where Self: 's; + type Sign<'s> + = Self + where Self: 's; fn approve(&self, _: &Psbt) -> Result, Rejected> { Ok(self.clone()) } }