Skip to content

Commit ea6bf12

Browse files
committed
Merge rust-bitcoin#3725: Rename private module to sealed
7725ca7 Rename private module to sealed (Tobin C. Harding) Pull request description: There are two `private` modules in `amount` but they do slightly different things. One provides a private `Token` and one is for trait sealing. We have various other trait sealing modules in the codebase and they are all called `sealed` not `private`. Also the seal trait is called `Sealed`. Rename the `private` module and the trait to be uniform with the rest of the codebase. ACKs for top commit: apoelstra: ACK 7725ca7; successfully ran local tests; sure Tree-SHA512: 5953686d7d22daaad8d2d59eff2338db3bb2a7765a37c08ed02ae1a4622509d628dbcb971781a6e85d750afa58609f5b058dfce6d5b4066f4f0d8ded45375b5b
2 parents 6865ced + 7725ca7 commit ea6bf12

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

units/src/amount/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ enum DisplayStyle {
563563
}
564564

565565
/// Calculates the sum over the iterator using checked arithmetic.
566-
pub trait CheckedSum<R>: private::SumSeal<R> {
566+
pub trait CheckedSum<R>: sealed::Sealed<R> {
567567
/// Calculates the sum over the iterator using checked arithmetic. If an over or underflow would
568568
/// happen it returns [`None`].
569569
fn checked_sum(self) -> Option<R>;
@@ -591,12 +591,12 @@ where
591591
}
592592
}
593593

594-
mod private {
594+
mod sealed {
595595
use super::{Amount, SignedAmount};
596596

597597
/// Used to seal the `CheckedSum` trait
598-
pub trait SumSeal<A> {}
598+
pub trait Sealed<A> {}
599599

600-
impl<T> SumSeal<Amount> for T where T: Iterator<Item = Amount> {}
601-
impl<T> SumSeal<SignedAmount> for T where T: Iterator<Item = SignedAmount> {}
600+
impl<T> Sealed<Amount> for T where T: Iterator<Item = Amount> {}
601+
impl<T> Sealed<SignedAmount> for T where T: Iterator<Item = SignedAmount> {}
602602
}

0 commit comments

Comments
 (0)