We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deb9734 commit d9d6856Copy full SHA for d9d6856
src/util/amount.rs
@@ -346,7 +346,7 @@ impl Amount {
346
pub const MAX_MONEY: Amount = Amount(21_000_000 * 100_000_000);
347
348
/// Create an [Amount] with satoshi precision and the given number of satoshis.
349
- pub fn from_sat(satoshi: u64) -> Amount {
+ pub const fn from_sat(satoshi: u64) -> Amount {
350
Amount(satoshi)
351
}
352
@@ -633,7 +633,7 @@ impl SignedAmount {
633
pub const MAX_MONEY: SignedAmount = SignedAmount(21_000_000 * 100_000_000);
634
635
/// Create an [SignedAmount] with satoshi precision and the given number of satoshis.
636
- pub fn from_sat(satoshi: i64) -> SignedAmount {
+ pub const fn from_sat(satoshi: i64) -> SignedAmount {
637
SignedAmount(satoshi)
638
639
0 commit comments