From ffd8702cb312e5722601652d26a2daadeb25f147 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 7 Jan 2025 08:55:26 +1100 Subject: [PATCH] units: Hide the remaining public macros We do not want to commit to any public macros in `units`. Recently we (I at least) learned that adding `doc(hidden)` signals to users that the macro is unstable and should not be relied upon. Hide the remaining two macros so we can release 1.0 and not worry about later breaking them. With this applied there are no exported macros that are not hidden. Verify using `git grep -A 1 macro_export`. --- units/src/parse.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/units/src/parse.rs b/units/src/parse.rs index 4ad750acc..49f4064b7 100644 --- a/units/src/parse.rs +++ b/units/src/parse.rs @@ -117,6 +117,7 @@ pub fn int + Into>(s: S) -> Result { $crate::impl_tryfrom_str_from_int_infallible!(&str, $to, $inner, $fn); @@ -174,6 +175,7 @@ macro_rules! impl_tryfrom_str_from_int_infallible { /// /// All functions use the error returned by `$inner_fn`. #[macro_export] +#[doc(hidden)] // This is an 'internal' macro that should not be used outside of the `rust-bitcoin` crate. macro_rules! impl_parse_str { ($to:ty, $err:ty, $inner_fn:expr) => { $crate::impl_tryfrom_str!(&str, $to, $err, $inner_fn);