diff --git a/.rustfmt.toml b/.rustfmt.toml index 35c1d1e..98e9b85 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,4 +1,5 @@ edition = "2021" +version = "Two" max_width = 100 array_width = 100 @@ -8,9 +9,10 @@ chain_width = 100 fn_call_width = 100 single_line_if_else_max_width = 100 -format_code_in_doc_comments = true fn_single_line = true +format_code_in_doc_comments = true format_macro_matchers = true +format_macro_bodies = true format_strings = true merge_derives = false overflow_delimited_expr = true @@ -22,4 +24,4 @@ where_single_line = true unstable_features = true imports_granularity = "Module" -group_imports = "StdExternalCrate" \ No newline at end of file +group_imports = "StdExternalCrate" diff --git a/invoice/src/address.rs b/invoice/src/address.rs index 7117200..3687244 100644 --- a/invoice/src/address.rs +++ b/invoice/src/address.rs @@ -258,11 +258,11 @@ impl FromStr for Address { return Err(AddressParseError::FutureTaprootVersion( program.len(), s.to_owned(), - )) + )); } (WitnessVer::V0 | WitnessVer::V1, wrong) => { - return Err(AddressParseError::InvalidBech32Variant(wrong)) + return Err(AddressParseError::InvalidBech32Variant(wrong)); } (future, _) => return Err(AddressParseError::FutureWitnessVersion(future)), diff --git a/psbt/src/data.rs b/psbt/src/data.rs index 5cf12ba..a665f99 100644 --- a/psbt/src/data.rs +++ b/psbt/src/data.rs @@ -903,13 +903,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