Skip to content

Commit 333b0a0

Browse files
authored
tweak format_args! docs
Swap the variable names in the example.
1 parent 93a3e93 commit 333b0a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/macros.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ pub mod builtin {
341341
/// format string in `format_args!`.
342342
///
343343
/// ```rust
344-
/// let display = format!("{:?}", format_args!("{} foo {:?}", 1, 2));
345-
/// let debug = format!("{}", format_args!("{} foo {:?}", 1, 2));
344+
/// let debug = format!("{:?}", format_args!("{} foo {:?}", 1, 2));
345+
/// let display = format!("{}", format_args!("{} foo {:?}", 1, 2));
346346
/// assert_eq!("1 foo 2", display);
347347
/// assert_eq!(display, debug);
348348
/// ```

0 commit comments

Comments
 (0)