You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix incorrect padding in fixed-width print (#1584)
When using fixed-width padded strings, the explanation/example adds an extra padding character.
println!("{number:>5}", number=1); formats the string to length 5, but the example text displays a string of width 6.
Similarly:
println!("{number:0>5}", number=1); pads with four zeroes, but the example shows five zeroes and then a "1" which is incorrect.
This commit corrects both of these errors.
0 commit comments