From 827fcd8a89bde7d8c84678f6e90df9d6756230e7 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 7 Jun 2022 14:29:15 +1000 Subject: [PATCH] Allow unusual digit grouping Clippy emits: warning: digits grouped inconsistently by underscores Add allow directive for grouping that aims to make explicit 100,000,000 sats/per bitcoin. --- src/util/amount.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/amount.rs b/src/util/amount.rs index d72b67dc..e2eff86b 100644 --- a/src/util/amount.rs +++ b/src/util/amount.rs @@ -1599,6 +1599,7 @@ mod tests { } #[test] + #[allow(clippy::inconsistent_digit_grouping)] // Group to show 100,000,000 sats per bitcoin. fn parsing() { use super::ParseAmountError as E; let btc = Denomination::Bitcoin; @@ -1868,6 +1869,7 @@ mod tests { } #[test] + #[allow(clippy::inconsistent_digit_grouping)] // Group to show 100,000,000 sats per bitcoin. fn from_str() { use super::ParseAmountError as E; let p = Amount::from_str; @@ -1906,6 +1908,7 @@ mod tests { } #[test] + #[allow(clippy::inconsistent_digit_grouping)] // Group to show 100,000,000 sats per bitcoin. fn to_from_string_in() { use super::Denomination as D; let ua_str = Amount::from_str_in;