]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Use `[u8; 3]` not `CurrencyCode` to skip type aliases to primitives
authorMatt Corallo <git@bluematt.me>
Sat, 11 May 2024 20:05:26 +0000 (20:05 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 14 May 2024 20:46:40 +0000 (20:46 +0000)
lightning/src/offers/offer.rs

index 3462823528e56a633963cd3b5a929328eed31f7c..574effb56bb6b6cf229f18ef6fc69fdd00f0f6ff 100644 (file)
@@ -990,14 +990,14 @@ pub enum Amount {
        /// An amount of currency specified using ISO 4712.
        Currency {
                /// The currency that the amount is denominated in.
-               iso4217_code: CurrencyCode,
+               iso4217_code: [u8; 3],
                /// The amount in the currency unit adjusted by the ISO 4712 exponent (e.g., USD cents).
                amount: u64,
        },
 }
 
 /// An ISO 4712 three-letter currency code (e.g., USD).
-pub type CurrencyCode = [u8; 3];
+pub(crate) type CurrencyCode = [u8; 3];
 
 /// Quantity of items supported by an [`Offer`].
 #[derive(Clone, Copy, Debug, PartialEq)]