fix: clippy warnings

This commit is contained in:
thunderbiscuit 2024-04-19 14:57:09 -04:00
parent 4f8b7f4ba5
commit 4dd4e91ccd
No known key found for this signature in database
GPG Key ID: 88253696EB836462
2 changed files with 10 additions and 10 deletions

View File

@ -87,7 +87,7 @@ interface AddressError {
ExcessiveScriptSize(); ExcessiveScriptSize();
UnrecognizedScript(); UnrecognizedScript();
NetworkValidation(Network required, Network found, string address); NetworkValidation(Network required, Network found, string address);
OtherAddressError(); OtherAddressErr();
}; };
[Error] [Error]
@ -98,7 +98,7 @@ interface TransactionError {
NonMinimalVarInt(); NonMinimalVarInt();
ParseFailed(); ParseFailed();
UnsupportedSegwitFlag(u8 flag); UnsupportedSegwitFlag(u8 flag);
OtherTransactionError(); OtherTransactionErr();
}; };
[Error] [Error]
@ -151,7 +151,7 @@ interface ExtractTxError {
AbsurdFeeRate(u64 fee_rate); AbsurdFeeRate(u64 fee_rate);
MissingInputValue(); MissingInputValue();
SendingTooMuch(); SendingTooMuch();
OtherExtractTransactionError(); OtherExtractTxErr();
}; };
[Error] [Error]

View File

@ -223,7 +223,7 @@ pub enum AddressError {
// This is required because the bdk::bitcoin::address::Error is non-exhaustive // This is required because the bdk::bitcoin::address::Error is non-exhaustive
#[error("other address error")] #[error("other address error")]
OtherAddressError, OtherAddressErr,
} }
// Mapping https://docs.rs/bitcoin/latest/src/bitcoin/consensus/encode.rs.html#40-63 // Mapping https://docs.rs/bitcoin/latest/src/bitcoin/consensus/encode.rs.html#40-63
@ -249,7 +249,7 @@ pub enum TransactionError {
// This is required because the bdk::bitcoin::consensus::encode::Error is non-exhaustive // This is required because the bdk::bitcoin::consensus::encode::Error is non-exhaustive
#[error("other transaction error")] #[error("other transaction error")]
OtherTransactionError, OtherTransactionErr,
} }
#[derive(Debug, thiserror::Error)] #[derive(Debug, thiserror::Error)]
@ -359,7 +359,7 @@ pub enum ExtractTxError {
#[error( #[error(
"this error is required because the bdk::bitcoin::psbt::ExtractTxError is non-exhaustive" "this error is required because the bdk::bitcoin::psbt::ExtractTxError is non-exhaustive"
)] )]
OtherExtractTransactionError, OtherExtractTxErr,
} }
impl From<BdkDescriptorError> for DescriptorError { impl From<BdkDescriptorError> for DescriptorError {
@ -622,7 +622,7 @@ impl From<bdk::bitcoin::address::Error> for AddressError {
found, found,
address: format!("{:?}", address), address: format!("{:?}", address),
}, },
_ => AddressError::OtherAddressError, _ => AddressError::OtherAddressErr,
} }
} }
} }
@ -638,7 +638,7 @@ impl From<ParseError> for AddressError {
ParseError::WitnessProgram(e) => AddressError::WitnessProgram { ParseError::WitnessProgram(e) => AddressError::WitnessProgram {
error_message: e.to_string(), error_message: e.to_string(),
}, },
_ => AddressError::OtherAddressError, _ => AddressError::OtherAddressErr,
} }
} }
} }
@ -663,7 +663,7 @@ impl From<bdk::bitcoin::consensus::encode::Error> for TransactionError {
bdk::bitcoin::consensus::encode::Error::UnsupportedSegwitFlag(flag) => { bdk::bitcoin::consensus::encode::Error::UnsupportedSegwitFlag(flag) => {
TransactionError::UnsupportedSegwitFlag { flag } TransactionError::UnsupportedSegwitFlag { flag }
} }
_ => TransactionError::OtherTransactionError, _ => TransactionError::OtherTransactionErr,
} }
} }
} }
@ -683,7 +683,7 @@ impl From<bdk::bitcoin::psbt::ExtractTxError> for ExtractTxError {
bdk::bitcoin::psbt::ExtractTxError::SendingTooMuch { .. } => { bdk::bitcoin::psbt::ExtractTxError::SendingTooMuch { .. } => {
ExtractTxError::SendingTooMuch ExtractTxError::SendingTooMuch
} }
_ => ExtractTxError::OtherExtractTransactionError, _ => ExtractTxError::OtherExtractTxErr,
} }
} }
} }