From 62f726d5a81059440dc88aa9feb10a74d288b004 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 12 Mar 2024 12:56:07 +1100 Subject: [PATCH] Remove useless convertion No clue how this got into master; found with `just sane`. Clippy emits: useless conversion to the same type: `amount::ParseAmountError` As suggested, remove the useless conversion. --- units/src/amount.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units/src/amount.rs b/units/src/amount.rs index 268ee6ca..963a248f 100644 --- a/units/src/amount.rs +++ b/units/src/amount.rs @@ -2493,7 +2493,7 @@ mod tests { use super::ParseAmountError as E; - assert_eq!(Amount::from_str("x BTC"), Err(E::from(E::from(InvalidCharacterError { invalid_char: 'x', position: 0 })).into())); + assert_eq!(Amount::from_str("x BTC"), Err(E::from(InvalidCharacterError { invalid_char: 'x', position: 0 }).into())); assert_eq!( Amount::from_str("xBTC"), Err(Unknown(UnknownDenominationError("xBTC".into())).into()),