From da69e636a9d21e602289062279ed5ebc6b1429b6 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 8 Apr 2025 13:44:37 +1000 Subject: [PATCH] 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. --- units/src/fee.rs | 14 ++++++-------- units/src/fee_rate/mod.rs | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/units/src/fee.rs b/units/src/fee.rs index 81dc35839..aaae71039 100644 --- a/units/src/fee.rs +++ b/units/src/fee.rs @@ -141,10 +141,9 @@ impl FeeRate { /// Checked weight multiplication. /// - /// Computes the absolute fee amount for a given [`Weight`] at this fee rate. - /// When the resulting fee is a non-integer amount, the amount is rounded up, - /// ensuring that the transaction fee is enough instead of falling short if - /// rounded down. + /// Computes the absolute fee amount for a given [`Weight`] at this fee rate. When the resulting + /// fee is a non-integer amount, the amount is rounded up, ensuring that the transaction fee is + /// enough instead of falling short if rounded down. /// /// Returns [`None`] if overflow occurred. #[must_use] @@ -198,10 +197,9 @@ crate::internal_macros::impl_op_for_references! { impl Weight { /// Checked fee rate multiplication. /// - /// Computes the absolute fee amount for a given [`FeeRate`] at this weight. - /// When the resulting fee is a non-integer amount, the amount is rounded up, - /// ensuring that the transaction fee is enough instead of falling short if - /// rounded down. + /// Computes the absolute fee amount for a given [`FeeRate`] at this weight. When the resulting + /// fee is a non-integer amount, the amount is rounded up, ensuring that the transaction fee is + /// enough instead of falling short if rounded down. /// /// Returns [`None`] if overflow occurred. #[must_use] diff --git a/units/src/fee_rate/mod.rs b/units/src/fee_rate/mod.rs index 238d21a73..0daafa2d2 100644 --- a/units/src/fee_rate/mod.rs +++ b/units/src/fee_rate/mod.rs @@ -12,8 +12,8 @@ use arbitrary::{Arbitrary, Unstructured}; /// Represents fee rate. /// -/// This is an integer newtype representing fee rate in `sat/kwu`. It provides protection against mixing -/// up the types as well as basic formatting features. +/// This is an integer newtype representing fee rate in `sat/kwu`. It provides protection against +/// mixing up the types as well as basic formatting features. #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct FeeRate(u64);