Merge rust-bitcoin/rust-bitcoin#4138: units: Improve code comment on macros

8787304425 units: Improve code comment on macros (Tobin C. Harding)

Pull request description:

  We have two macros that are hidden because they are code de-duplication tools. However the output they produce is, and has to be, stable so that we can use them in `units` and `primitives` without inadvertently breaking semver in `primitives`.

ACKs for top commit:
  apoelstra:
    ACK 8787304425c83cccfb1107bde0b0d82901470d38; successfully ran local tests

Tree-SHA512: 564bb27dcb608f391be8e50cbf2da02d2f339ddf575e5b5fd432a93df96233b50541616167c7c84a134ed31455a64149c822aea72e61c042fb1aeb8fab20d4ce
This commit is contained in:
merge-script 2025-03-01 19:46:31 +00:00
commit c2741c8eee
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ fn int<T: Integer, S: AsRef<str> + Into<InputString>>(s: S) -> Result<T, ParseIn
///
/// If parsing the string fails then a `units::parse::ParseIntError` is returned.
#[macro_export]
#[doc(hidden)] // This is an 'internal' macro that should not be used outside of the `rust-bitcoin` crate.
#[doc(hidden)] // This macro is stable but is considered internal to the `rust-bitcoin` repository.
macro_rules! impl_parse_str_from_int_infallible {
($to:ident, $inner:ident, $fn:ident) => {
impl $crate::_export::_core::str::FromStr for $to {
@ -214,7 +214,7 @@ macro_rules! impl_parse_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.
#[doc(hidden)] // This macro is stable but is considered internal to the `rust-bitcoin` repository.
macro_rules! impl_parse_str {
($to:ty, $err:ty, $inner_fn:expr) => {
$crate::impl_tryfrom_str!(&str, $to, $err, $inner_fn);