Remove impl From<u64> for FeeRate

This function leaks the inner unit of `FeeRate`. We want to change the
unit, best to break downstream so they notice.
This commit is contained in:
Tobin C. Harding 2025-05-21 10:32:17 +10:00
parent 855299ab7e
commit c63f80baec
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 0 additions and 10 deletions

View File

@ -131,10 +131,6 @@ impl FeeRate {
} }
} }
impl From<FeeRate> for u64 {
fn from(value: FeeRate) -> Self { value.to_sat_per_kwu() }
}
crate::internal_macros::impl_op_for_references! { crate::internal_macros::impl_op_for_references! {
impl ops::Add<FeeRate> for FeeRate { impl ops::Add<FeeRate> for FeeRate {
type Output = FeeRate; type Output = FeeRate;
@ -195,12 +191,6 @@ mod tests {
use super::*; use super::*;
#[test]
fn sanity_check() {
let fee_rate: u64 = u64::from(FeeRate::from_sat_per_kwu(100));
assert_eq!(fee_rate, 100_u64);
}
#[test] #[test]
#[allow(clippy::op_ref)] #[allow(clippy::op_ref)]
fn feerate_div_nonzero() { fn feerate_div_nonzero() {