Skip to content

Commit 65f9916

Browse files
committed
fix(docs): correct fee_rate, fee_wu and fee_vb descriptions
1 parent 3c5954e commit 65f9916

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

units/src/fee_rate/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,16 @@ impl FeeRate {
188188
/// Calculates the fee by multiplying this fee rate by weight, in weight units, returning [`None`]
189189
/// if an overflow occurred.
190190
///
191-
/// This is equivalent to `Self::checked_mul_by_weight()`.
191+
/// This is equivalent to `Self::mul_by_weight(weight).ok()`.
192192
#[must_use]
193193
#[deprecated(since = "TBD", note = "use `to_fee()` instead")]
194194
pub fn fee_wu(self, weight: Weight) -> Option<Amount> { self.mul_by_weight(weight).ok() }
195195

196196
/// Calculates the fee by multiplying this fee rate by weight, in virtual bytes, returning [`None`]
197-
/// if an overflow occurred.
197+
/// if `vb` cannot be represented as [`Weight`].
198198
///
199199
/// This is equivalent to converting `vb` to [`Weight`] using [`Weight::from_vb`] and then calling
200-
/// `Self::fee_wu(weight)`.
200+
/// [`Self::to_fee`].
201201
#[must_use]
202202
#[deprecated(since = "TBD", note = "use Weight::from_vb and then `to_fee()` instead")]
203203
pub fn fee_vb(self, vb: u64) -> Option<Amount> { Weight::from_vb(vb).map(|w| self.to_fee(w)) }

0 commit comments

Comments
 (0)