about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcollections/fmt.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs
index ce1d6ec5a64..c8030c1efd6 100644
--- a/src/libcollections/fmt.rs
+++ b/src/libcollections/fmt.rs
@@ -527,7 +527,7 @@ use string;
 /// use std::fmt;
 ///
 /// let s = fmt::format(format_args!("Hello, {}!", "world"));
-/// assert_eq!(s, "Hello, world!".to_string());
+/// assert_eq!(s, "Hello, world!");
 /// ```
 ///
 /// Please note that using [`format!`][format!] might be preferrable.
@@ -535,7 +535,7 @@ use string;
 ///
 /// ```
 /// let s = format!("Hello, {}!", "world");
-/// assert_eq!(s, "Hello, world!".to_string());
+/// assert_eq!(s, "Hello, world!");
 /// ```
 ///
 /// [format!]: ../macro.format!.html