units: Use 100 column width in rustdoc comments

We typically use 100 column width for comments, do so but only if it
does not make the layout worse.
This commit is contained in:
Tobin C. Harding 2025-04-08 13:44:37 +10:00
parent 53c6ae4d40
commit da69e636a9
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
2 changed files with 8 additions and 10 deletions

View File

@ -141,10 +141,9 @@ impl FeeRate {
/// Checked weight multiplication. /// Checked weight multiplication.
/// ///
/// Computes the absolute fee amount for a given [`Weight`] at this fee rate. /// Computes the absolute fee amount for a given [`Weight`] at this fee rate. When the resulting
/// When the resulting fee is a non-integer amount, the amount is rounded up, /// fee is a non-integer amount, the amount is rounded up, ensuring that the transaction fee is
/// ensuring that the transaction fee is enough instead of falling short if /// enough instead of falling short if rounded down.
/// rounded down.
/// ///
/// Returns [`None`] if overflow occurred. /// Returns [`None`] if overflow occurred.
#[must_use] #[must_use]
@ -198,10 +197,9 @@ crate::internal_macros::impl_op_for_references! {
impl Weight { impl Weight {
/// Checked fee rate multiplication. /// Checked fee rate multiplication.
/// ///
/// Computes the absolute fee amount for a given [`FeeRate`] at this weight. /// Computes the absolute fee amount for a given [`FeeRate`] at this weight. When the resulting
/// When the resulting fee is a non-integer amount, the amount is rounded up, /// fee is a non-integer amount, the amount is rounded up, ensuring that the transaction fee is
/// ensuring that the transaction fee is enough instead of falling short if /// enough instead of falling short if rounded down.
/// rounded down.
/// ///
/// Returns [`None`] if overflow occurred. /// Returns [`None`] if overflow occurred.
#[must_use] #[must_use]

View File

@ -12,8 +12,8 @@ use arbitrary::{Arbitrary, Unstructured};
/// Represents fee rate. /// Represents fee rate.
/// ///
/// This is an integer newtype representing fee rate in `sat/kwu`. It provides protection against mixing /// This is an integer newtype representing fee rate in `sat/kwu`. It provides protection against
/// up the types as well as basic formatting features. /// mixing up the types as well as basic formatting features.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct FeeRate(u64); pub struct FeeRate(u64);