Skip to content

Commit 226cb9c

Browse files
committed
doc: to_string not needed since we gots coercion
1 parent e88defe commit 226cb9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcollections/fmt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -527,15 +527,15 @@ use string;
527527
/// use std::fmt;
528528
///
529529
/// let s = fmt::format(format_args!("Hello, {}!", "world"));
530-
/// assert_eq!(s, "Hello, world!".to_string());
530+
/// assert_eq!(s, "Hello, world!");
531531
/// ```
532532
///
533533
/// Please note that using [`format!`][format!] might be preferrable.
534534
/// Example:
535535
///
536536
/// ```
537537
/// let s = format!("Hello, {}!", "world");
538-
/// assert_eq!(s, "Hello, world!".to_string());
538+
/// assert_eq!(s, "Hello, world!");
539539
/// ```
540540
///
541541
/// [format!]: ../macro.format!.html

0 commit comments

Comments
 (0)