Skip to content

Commit e5260ae

Browse files
committed
Merge rust-bitcoin#5007: chore: fix some minor typos in code comments
94bb345 chore: small typo (sashass1315) 78b52a1 Update unsigned.rs (sashass1315) 9db8430 chore: fix small typo (sashass1315) 650b0cc chore: fix small typo (sashass1315) Pull request description: These form -> These forms Sanity check than -> Sanity check that No need to used -> No need to use is case -> in case ACKs for top commit: apoelstra: ACK 94bb345; successfully ran local tests Tree-SHA512: 650be9d348d6fea860e51e469ece580811584c9a1fefa60e1802ec607490b9d9f4188b88e01f2e1318e7a75ca2647c3cfd5d8883fa2bb9205011840483fe9a6e
2 parents 482c6c4 + 94bb345 commit e5260ae

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

units/src/amount/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl Denomination {
146146
}
147147
}
148148

149-
/// These form are ambiguous and could have many meanings. For example, M could denote Mega or Milli.
149+
/// These forms are ambiguous and could have many meanings. For example, M could denote Mega or Milli.
150150
/// If any of these forms are used, an error type `PossiblyConfusingDenomination` is returned.
151151
const CONFUSING_FORMS: [&str; 6] = ["CBTC", "Cbtc", "MBTC", "Mbtc", "UBTC", "Ubtc"];
152152

units/src/amount/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ fn check_const() {
11501150
assert_eq!(Amount::MAX.to_sat() as i64, SignedAmount::MAX.to_sat());
11511151
}
11521152

1153-
// Sanity check than stdlib supports the set of reference combinations for the ops we want.
1153+
// Sanity check that stdlib supports the set of reference combinations for the ops we want.
11541154
#[test]
11551155
#[allow(clippy::op_ref)] // We are explicitly testing the references work with ops.
11561156
fn sanity_all_ops() {

units/src/amount/unsigned.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ impl Amount {
463463

464464
// Mul by 1,000 because we use per/kwu.
465465
if let Some(sats) = self.to_sat().checked_mul(1_000) {
466-
// No need to used checked arithmetic because wu is non-zero.
466+
// No need to use checked arithmetic because wu is non-zero.
467467
if let Some(bump) = sats.checked_add(wu - 1) {
468468
let fee_rate = bump / wu;
469469
if let Ok(amount) = Amount::from_sat(fee_rate) {

units/src/fee_rate/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl FeeRate {
146146

147147
/// Checked addition.
148148
///
149-
/// Computes `self + rhs` returning [`None`] is case of overflow.
149+
/// Computes `self + rhs` returning [`None`] in case of overflow.
150150
#[must_use]
151151
pub const fn checked_add(self, rhs: FeeRate) -> Option<Self> {
152152
// No `map()` in const context.

0 commit comments

Comments
 (0)