1
Fork 0

Add #[track_caller] to from_usize.

This commit is contained in:
Mara Bos 2025-02-28 12:49:28 +01:00
parent 7677567e54
commit 2647cf17e7

View file

@ -154,6 +154,7 @@ impl Argument<'_> {
Self::new(x, UpperExp::fmt)
}
#[inline]
#[track_caller]
pub const fn from_usize(x: &usize) -> Argument<'_> {
if *x > u16::MAX as usize {
panic!("Formatting argument out of range");