Skip to content

Commit

Permalink
chore: fix fmt with new style_edition
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dr-orlovsky committed Oct 13, 2024
1 parent 0acc494 commit 877b14c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
edition = "2021"
version = "Two"
style_edition = "2021"

max_width = 100
array_width = 100
Expand Down
4 changes: 2 additions & 2 deletions derive/src/xkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions psbt/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 913 in psbt/src/data.rs

View check run for this annotation

Codecov / codecov/patch

psbt/src/data.rs#L912-L913

Added lines #L912 - L913 were not covered by tests
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

Check warning on line 918 in psbt/src/data.rs

View check run for this annotation

Codecov / codecov/patch

psbt/src/data.rs#L918

Added line #L918 was not covered by tests
self.tap_key_sig = None; // 0x013
self.tap_script_sig.clear(); // 0x014
self.tap_leaf_script.clear(); // 0x015
Expand Down
4 changes: 3 additions & 1 deletion src/signers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self::Sign<'_>, Rejected> { Ok(self.clone()) }
}
Expand Down

0 comments on commit 877b14c

Please sign in to comment.