Add `µBTC` as a recognized `str` form of `uBTC`
`µ` is the correct letter for the SI unit micro but is not on most standard keyboards. `u` was used instead because it looks similar. Add `µBTC` to the list of recognized strings for MicroBitcoin and to the rustdocs.
This commit is contained in:
parent
39dd3cad20
commit
2ca24f00f2
|
@ -42,7 +42,7 @@ pub use self::{
|
||||||
///
|
///
|
||||||
/// # Accepted Denominations
|
/// # Accepted Denominations
|
||||||
///
|
///
|
||||||
/// All upper or lower case, excluding SI prefix (c, m, u) which must be lower case.
|
/// All upper or lower case, excluding SI prefixes c, m and u (or µ) which must be lower case.
|
||||||
/// - Singular: BTC, cBTC, mBTC, uBTC
|
/// - Singular: BTC, cBTC, mBTC, uBTC
|
||||||
/// - Plural or singular: sat, satoshi, bit
|
/// - Plural or singular: sat, satoshi, bit
|
||||||
///
|
///
|
||||||
|
@ -119,7 +119,7 @@ impl Denomination {
|
||||||
"BTC" | "btc" => Some(Denomination::Bitcoin),
|
"BTC" | "btc" => Some(Denomination::Bitcoin),
|
||||||
"cBTC" | "cbtc" => Some(Denomination::CentiBitcoin),
|
"cBTC" | "cbtc" => Some(Denomination::CentiBitcoin),
|
||||||
"mBTC" | "mbtc" => Some(Denomination::MilliBitcoin),
|
"mBTC" | "mbtc" => Some(Denomination::MilliBitcoin),
|
||||||
"uBTC" | "ubtc" => Some(Denomination::MicroBitcoin),
|
"uBTC" | "ubtc" | "µBTC" | "µbtc" => Some(Denomination::MicroBitcoin),
|
||||||
"bit" | "bits" | "BIT" | "BITS" => Some(Denomination::Bit),
|
"bit" | "bits" | "BIT" | "BITS" => Some(Denomination::Bit),
|
||||||
"SATOSHI" | "satoshi" | "SATOSHIS" | "satoshis" | "SAT" | "sat" | "SATS" | "sats" =>
|
"SATOSHI" | "satoshi" | "SATOSHIS" | "satoshis" | "SAT" | "sat" | "SATS" | "sats" =>
|
||||||
Some(Denomination::Satoshi),
|
Some(Denomination::Satoshi),
|
||||||
|
|
Loading…
Reference in New Issue