repalce unncessary extra closure with function pointer in starts_with_uppercase closure inside Denomination from_str
This commit is contained in:
parent
b165b8da05
commit
8fef869c15
|
@ -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() => {
|
||||
|
|
Loading…
Reference in New Issue