@@ -337,27 +337,20 @@ macro_rules! try {
337
337
338
338
/// Write formatted data into a buffer
339
339
///
340
- /// This macro accepts a 'writer' (any value with a `write_fmt` method), a format string, and a
341
- /// list of arguments to format.
340
+ /// This macro accepts a format string, a list of arguments, and a 'writer'. Arguments will be
341
+ /// formatted according to the specified format string and the result will be passed to the writer.
342
+ /// The writer may be any value with a `write_fmt` method; generally this comes from an
343
+ /// implementation of either the [`std::fmt::Write`] or the [`std::io::Write`] trait. The macro
344
+ /// returns whatever the 'write_fmt' method returns; commonly a [`std::fmt::Result`], or an
345
+ /// [`io::Result`].
342
346
///
343
- /// The `write_fmt` method usually comes from an implementation of [`std::fmt::Write`][fmt_write]
344
- /// or [`std::io::Write`][io_write] traits. The term 'writer' refers to an implementation of one of
345
- /// these two traits.
347
+ /// See [`std::fmt`] for more information on the format string syntax.
346
348
///
347
- /// Passed arguments will be formatted according to the specified format string and the resulting
348
- /// string will be passed to the writer.
349
- ///
350
- /// See [`std::fmt`][fmt] for more information on format syntax.
351
- ///
352
- /// `write!` returns whatever the 'write_fmt' method returns.
353
- ///
354
- /// Common return values include: [`fmt::Result`][fmt_result], [`io::Result`][io_result]
355
- ///
356
- /// [fmt]: ../std/fmt/index.html
357
- /// [fmt_write]: ../std/fmt/trait.Write.html
358
- /// [io_write]: ../std/io/trait.Write.html
359
- /// [fmt_result]: ../std/fmt/type.Result.html
360
- /// [io_result]: ../std/io/type.Result.html
349
+ /// [`std::fmt`]: ../std/fmt/index.html
350
+ /// [`std::fmt::Write`]: ../std/fmt/trait.Write.html
351
+ /// [`std::io::Write`]: ../std/io/trait.Write.html
352
+ /// [`std::fmt::Result`]: ../std/fmt/type.Result.html
353
+ /// [`io::Result`]: ../std/io/type.Result.html
361
354
///
362
355
/// # Examples
363
356
///
@@ -396,27 +389,12 @@ macro_rules! write {
396
389
/// On all platforms, the newline is the LINE FEED character (`\n`/`U+000A`) alone
397
390
/// (no additional CARRIAGE RETURN (`\r`/`U+000D`).
398
391
///
399
- /// This macro accepts a 'writer' (any value with a `write_fmt` method), a format string, and a
400
- /// list of arguments to format.
401
- ///
402
- /// The `write_fmt` method usually comes from an implementation of [`std::fmt::Write`][fmt_write]
403
- /// or [`std::io::Write`][io_write] traits. The term 'writer' refers to an implementation of one of
404
- /// these two traits.
405
- ///
406
- /// Passed arguments will be formatted according to the specified format string and the resulting
407
- /// string will be passed to the writer, along with the appended newline.
408
- ///
409
- /// See [`std::fmt`][fmt] for more information on format syntax.
410
- ///
411
- /// `write!` returns whatever the 'write_fmt' method returns.
392
+ /// For more information, see [`write!`]. For information on the format string syntax, see
393
+ /// [`std::fmt`].
412
394
///
413
- /// Common return values include: [`fmt::Result`][fmt_result], [`io::Result`][io_result]
395
+ /// [`write!`]: macro.write.html
396
+ /// [`std::fmt`]: ../std/fmt/index.html
414
397
///
415
- /// [fmt]: ../std/fmt/index.html
416
- /// [fmt_write]: ../std/fmt/trait.Write.html
417
- /// [io_write]: ../std/io/trait.Write.html
418
- /// [fmt_result]: ../std/fmt/type.Result.html
419
- /// [io_result]: ../std/io/type.Result.html
420
398
///
421
399
/// # Examples
422
400
///
0 commit comments