From 7725ca77c589a5215c50f1634f1b095d3e268540 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 11 Dec 2024 13:01:05 +1100 Subject: [PATCH] Rename private module to sealed 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. --- units/src/amount/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/units/src/amount/mod.rs b/units/src/amount/mod.rs index db027a191..893b6bcf0 100644 --- a/units/src/amount/mod.rs +++ b/units/src/amount/mod.rs @@ -563,7 +563,7 @@ enum DisplayStyle { } /// Calculates the sum over the iterator using checked arithmetic. -pub trait CheckedSum: private::SumSeal { +pub trait CheckedSum: sealed::Sealed { /// Calculates the sum over the iterator using checked arithmetic. If an over or underflow would /// happen it returns [`None`]. fn checked_sum(self) -> Option; @@ -591,12 +591,12 @@ where } } -mod private { +mod sealed { use super::{Amount, SignedAmount}; /// Used to seal the `CheckedSum` trait - pub trait SumSeal {} + pub trait Sealed {} - impl SumSeal for T where T: Iterator {} - impl SumSeal for T where T: Iterator {} + impl Sealed for T where T: Iterator {} + impl Sealed for T where T: Iterator {} }