Skip to main content

MAX_FORMAT_WIDTH

Constant MAX_FORMAT_WIDTH 

Source
pub const MAX_FORMAT_WIDTH: usize = 20 /* 20usize */;
Expand description

Cap on the %0Nd zero-padding width in a $Number$, $Time$ or $Bandwidth$ substitution. A u64 in decimal has at most 20 digits, so a wider padding is meaningless and a hostile $Number%9999999999d$ would allocate or loop unboundedly.