Skip to content

Commit b172f2a

Browse files
committed
repalce unncessary extra closure with function pointer in starts_with_uppercase closure inside Denomination from_str
1 parent 6a85997 commit b172f2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/amount.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl FromStr for Denomination {
8585
use self::ParseAmountError::*;
8686
use self::Denomination as D;
8787

88-
let starts_with_uppercase = || s.starts_with(|ch: char| ch.is_uppercase());
88+
let starts_with_uppercase = || s.starts_with(char::is_uppercase);
8989
match denomination_from_str(s) {
9090
None => Err(UnknownDenomination(s.to_owned())),
9191
Some(D::MilliBitcoin) | Some(D::PicoBitcoin) | Some(D::MilliSatoshi) if starts_with_uppercase() => {

0 commit comments

Comments
 (0)