@@ -229,21 +229,23 @@ macro_rules! try {
229
229
} )
230
230
}
231
231
232
- /// Calls `write_fmt` function on a writer
232
+ /// Write formatted data into a buffer
233
233
///
234
- /// This macro takes an implementor of [`std::fmt::Write`][fmt_write] or
235
- /// [`std::io::Write`][io_write] trait, a format string, and a list of arguments .
234
+ /// This macro accepts any value with `write_fmt` method as a writer, a format string, and a list
235
+ /// of arguments to format.
236
236
///
237
- /// Implementors of the `Write` trait are sometimes called 'writers'.
237
+ /// `write_fmt` method usually comes from an implementation of [`std::fmt::Write`][fmt_write] or
238
+ /// [`std::io::Write`][io_write] traits. These are sometimes called 'writers'.
238
239
///
239
- /// These arguments will be formatted according to the specified format string and
240
- /// the resulting string will be passed to the writer.
241
- ///
242
- /// Return value is either [`Result`][enum_result] or [`io::Result`][type_result] depending on
243
- /// the writer.
240
+ /// Passed arguments will be formatted according to the specified format string and the resulting
241
+ /// string will be passed to the writer.
244
242
///
245
243
/// See [`std::fmt`][fmt] for more information on format syntax.
246
244
///
245
+ /// Return value is completely dependent on the 'write_fmt' method.
246
+ ///
247
+ /// Common return values are: [`Result`][enum_result], [`io::Result`][type_result]
248
+ ///
247
249
/// [fmt]: ../std/fmt/index.html
248
250
/// [fmt_write]: ../std/fmt/trait.Write.html
249
251
/// [io_write]: ../std/io/trait.Write.html
@@ -267,24 +269,26 @@ macro_rules! write {
267
269
( $dst: expr, $( $arg: tt) * ) => ( $dst. write_fmt( format_args!( $( $arg) * ) ) )
268
270
}
269
271
270
- /// Calls `write_fmt` function on a writer , with appending a newline.
272
+ /// Write formatted data into a buffer , with appending a newline.
271
273
///
272
- /// On all platforms, the newline is the LINE FEED character (`\n`/`U+000A`)
273
- /// alone (no additional CARRIAGE RETURN (`\r`/`U+000D`).
274
+ /// On all platforms, the newline is the LINE FEED character (`\n`/`U+000A`) alone
275
+ /// (no additional CARRIAGE RETURN (`\r`/`U+000D`).
274
276
///
275
- /// This macro takes an implementor of [`std::fmt::Write`][fmt_write] or
276
- /// [`std::io::Write`][io_write] trait, a format string, and a list of arguments .
277
+ /// This macro accepts any value with `write_fmt` method as a writer, a format string, and a list
278
+ /// of arguments to format.
277
279
///
278
- /// Implementors of the `Write` trait are sometimes called 'writers'.
280
+ /// `write_fmt` method usually comes from an implementation of [`std::fmt::Write`][fmt_write] or
281
+ /// [`std::io::Write`][io_write] traits. These are sometimes called 'writers'.
279
282
///
280
- /// These arguments will be formatted according to the specified format string and
281
- /// the resulting string will be passed to the writer.
282
- ///
283
- /// Return value is either [`Result`][enum_result] or [`io::Result`][type_result] depending on
284
- /// the writer.
283
+ /// Passed arguments will be formatted according to the specified format string and the resulting
284
+ /// string will be passed to the writer.
285
285
///
286
286
/// See [`std::fmt`][fmt] for more information on format syntax.
287
287
///
288
+ /// Return value is completely dependent on the 'write_fmt' method.
289
+ ///
290
+ /// Common return values are: [`Result`][enum_result], [`io::Result`][type_result]
291
+ ///
288
292
/// [fmt]: ../std/fmt/index.html
289
293
/// [fmt_write]: ../std/fmt/trait.Write.html
290
294
/// [io_write]: ../std/io/trait.Write.html
0 commit comments