about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcollections/fmt.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs
index 6f77d79ab0b..15de0dd802d 100644
--- a/src/libcollections/fmt.rs
+++ b/src/libcollections/fmt.rs
@@ -28,6 +28,7 @@
 //! format!("{:?}", (3, 4));          // => "(3, 4)"
 //! format!("{value}", value=4);      // => "4"
 //! format!("{} {}", 1, 2);           // => "1 2"
+//! format!("{:04}", 42);             // => "0042" with leading zeros
 //! ```
 //!
 //! From these, you can see that the first argument is a format string. It is