Merge rust-bitcoin/rust-bitcoin#4175: Use uniform return statement in docs
85612908af
Use uniform return statement in docs (Tobin C. Harding)
Pull request description:
We have a bunch of 'Returns [`None`] if .. ' statements. Make the whole module uniform.
ACKs for top commit:
apoelstra:
ACK 85612908af936c7f0866227e24a3359115991ca2; successfully ran local tests; lgtm
Tree-SHA512: 431b6ced433578c13bfc6134609d11084380310a2fbb66899387ac6982a6c4d63559faf9be460104e120c109cbd352b240886d4aa6b6d92cd5063d7b4ec5e04c
This commit is contained in:
commit
f0e12574aa
|
@ -144,7 +144,7 @@ impl FeeRate {
|
||||||
/// ensuring that the transaction fee is enough instead of falling short if
|
/// ensuring that the transaction fee is enough instead of falling short if
|
||||||
/// rounded down.
|
/// rounded down.
|
||||||
///
|
///
|
||||||
/// [`None`] is returned if an overflow occurred.
|
/// Returns [`None`] if overflow occurred.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn checked_mul_by_weight(self, weight: Weight) -> Option<Amount> {
|
pub const fn checked_mul_by_weight(self, weight: Weight) -> Option<Amount> {
|
||||||
// No `?` operator in const context.
|
// No `?` operator in const context.
|
||||||
|
@ -206,7 +206,7 @@ impl Weight {
|
||||||
/// ensuring that the transaction fee is enough instead of falling short if
|
/// ensuring that the transaction fee is enough instead of falling short if
|
||||||
/// rounded down.
|
/// rounded down.
|
||||||
///
|
///
|
||||||
/// [`None`] is returned if an overflow occurred.
|
/// Returns [`None`] if overflow occurred.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn checked_mul_by_fee_rate(self, fee_rate: FeeRate) -> Option<Amount> {
|
pub const fn checked_mul_by_fee_rate(self, fee_rate: FeeRate) -> Option<Amount> {
|
||||||
fee_rate.checked_mul_by_weight(self)
|
fee_rate.checked_mul_by_weight(self)
|
||||||
|
|
Loading…
Reference in New Issue