diff --git a/src/uu/date/src/format_modifiers.rs b/src/uu/date/src/format_modifiers.rs index b77ed78dd6..3e1071ef63 100644 --- a/src/uu/date/src/format_modifiers.rs +++ b/src/uu/date/src/format_modifiers.rs @@ -75,8 +75,7 @@ struct ParsedSpec<'a> { /// Flag characters from `[_0^#+-]`. flags: &'a str, /// Explicit width, if present. `None` means no width was specified. - /// A value that overflows `usize` is represented as `Some(usize::MAX)` so - /// the downstream allocation check surfaces it as `FieldWidthTooLarge`. + /// Width overflows are handled naturally by usize parsing. width: Option, /// The specifier itself, including any leading colons (e.g. `Y`, `:z`, `::z`). spec: &'a str, @@ -411,6 +410,16 @@ fn apply_modifiers(value: &str, parsed: &ParsedSpec<'_>) -> Result