Skip to content

Commit 6fc93b8

Browse files
committed
Rollup merge of rust-lang#25602 - parkr:patch-1, r=alexcrichton
Padding and alignment are often not implemented by types and can cause confusion in the user. Per discussion with @alexcrichton, here is my PR. /cc time-rs/time#98
2 parents 1bcfe5e + 733e7ee commit 6fc93b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcollections/fmt.rs

+4
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@
353353
//! * `^` - the argument is center-aligned in `width` columns
354354
//! * `>` - the argument is right-aligned in `width` columns
355355
//!
356+
//! Note that alignment may not be implemented by some types. A good way
357+
//! to ensure padding is applied is to format your input, then use this
358+
//! resulting string to pad your output.
359+
//!
356360
//! ## Sign/#/0
357361
//!
358362
//! These can all be interpreted as flags for a particular formatter.

0 commit comments

Comments
 (0)