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:
parent
855299ab7e
commit
c63f80baec
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue