From 8fef869c155cdbdd007b11c5542b81d40a3b6a11 Mon Sep 17 00:00:00 2001 From: KaFai Choi Date: Fri, 14 Jan 2022 19:48:31 +0700 Subject: [PATCH] repalce unncessary extra closure with function pointer in starts_with_uppercase closure inside Denomination from_str --- src/util/amount.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/amount.rs b/src/util/amount.rs index 0992d843..48958e0c 100644 --- a/src/util/amount.rs +++ b/src/util/amount.rs @@ -85,7 +85,7 @@ impl FromStr for Denomination { use self::ParseAmountError::*; use self::Denomination as D; - let starts_with_uppercase = || s.starts_with(|ch: char| ch.is_uppercase()); + let starts_with_uppercase = || s.starts_with(char::is_uppercase); match denomination_from_str(s) { None => Err(UnknownDenomination(s.to_owned())), Some(D::MilliBitcoin) | Some(D::PicoBitcoin) | Some(D::MilliSatoshi) if starts_with_uppercase() => {