We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e6efe4 commit c0b7e76Copy full SHA for c0b7e76
src/liballoc/fmt.rs
@@ -136,8 +136,12 @@
136
//!
137
//! Note that alignment may not be implemented by some types. In particular, it
138
//! is not generally implemented for the `Debug` trait. A good way to ensure
139
-//! padding is applied is to format your input, then use this resulting string
140
-//! to pad your output.
+//! padding is applied is to format your input, then pad this resulting string
+//! to obtain your output:
141
+//!
142
+//! ```
143
+//! println!("Hello {:^15}!", format!("{:?}", Some("hi"))); // => "Hello Some("hi") !"
144
145
146
//! ## Sign/`#`/`0`
147
0 commit comments