Skip to content

Commit

Permalink
Merge #134: Make write_err macro private
Browse files Browse the repository at this point in the history
56ffb40 Make write_err macro private (Tobin C. Harding)

Pull request description:

  This is a helper macro, it should never have been public.

ACKs for top commit:
  apoelstra:
    ACK 56ffb40; successfully ran local tests

Tree-SHA512: 852dbdb4b806f0ea484342a71266d5dcc84c6daea5fa0f0a37e779110726f26b87369cc8093b8757ccef45fdc7b343e186cfd9a83dd66eb995fa87b81f5d54e9
  • Loading branch information
apoelstra committed Jan 5, 2025
2 parents 22d39c9 + 56ffb40 commit 131aacf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
use core::fmt;

use crate::write_err;

/// Formats error.
///
/// If `std` feature is OFF appends error source (delimited by `: `). We do this because
/// `e.source()` is only available in std builds, without this macro the error source is lost for
/// no-std builds.
#[macro_export]
macro_rules! write_err {
($writer:expr, $string:literal $(, $args:expr)*; $source:expr) => {
{
Expand Down Expand Up @@ -132,7 +129,7 @@ impl fmt::Display for HexToArrayError {
use HexToArrayError::*;

match *self {
InvalidChar(ref e) => crate::write_err!(f, "failed to parse hex digit"; e),
InvalidChar(ref e) => write_err!(f, "failed to parse hex digit"; e),
InvalidLength(ref e) => write_err!(f, "failed to parse hex"; e),
}
}
Expand Down

0 comments on commit 131aacf

Please sign in to comment.