Skip to content

Commit 86c924f

Browse files
committed
fmt-debug option
Allows disabling `fmt::Debug` derive and debug formatting.
1 parent b1a56b5 commit 86c924f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: core/src/fmt/rt.rs

+4
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ impl<'a> Argument<'a> {
118118
Self::new(x, Debug::fmt)
119119
}
120120
#[inline(always)]
121+
pub fn new_debug_noop<'b, T: Debug>(x: &'b T) -> Argument<'_> {
122+
Self::new(x, |_, _| Ok(()))
123+
}
124+
#[inline(always)]
121125
pub fn new_octal<'b, T: Octal>(x: &'b T) -> Argument<'_> {
122126
Self::new(x, Octal::fmt)
123127
}

0 commit comments

Comments
 (0)