Skip to content

Commit

Permalink
fmt-debug option
Browse files Browse the repository at this point in the history
Allows disabling `fmt::Debug` derive and debug formatting.
  • Loading branch information
kornelski committed Aug 28, 2024
1 parent b1a56b5 commit 86c924f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/fmt/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ impl<'a> Argument<'a> {
Self::new(x, Debug::fmt)
}
#[inline(always)]
pub fn new_debug_noop<'b, T: Debug>(x: &'b T) -> Argument<'_> {
Self::new(x, |_, _| Ok(()))
}
#[inline(always)]
pub fn new_octal<'b, T: Octal>(x: &'b T) -> Argument<'_> {
Self::new(x, Octal::fmt)
}
Expand Down

0 comments on commit 86c924f

Please sign in to comment.