Auto merge of #13193 - alex-semenyuk:fix_doc_unused_io_amount, r=xFrednet
Fix doc example for UNUSED_IO_AMOUNT Cosmetic changes. Unify example for UNUSED_IO_AMOUNT changelog: none
This commit is contained in:
commit
73819440ea
@ -34,11 +34,18 @@
|
||||
/// ```rust,ignore
|
||||
/// use std::io;
|
||||
/// fn foo<W: io::Write>(w: &mut W) -> io::Result<()> {
|
||||
/// // must be `w.write_all(b"foo")?;`
|
||||
/// w.write(b"foo")?;
|
||||
/// Ok(())
|
||||
/// }
|
||||
/// ```
|
||||
/// Use instead:
|
||||
/// ```rust,ignore
|
||||
/// use std::io;
|
||||
/// fn foo<W: io::Write>(w: &mut W) -> io::Result<()> {
|
||||
/// w.write_all(b"foo")?;
|
||||
/// Ok(())
|
||||
/// }
|
||||
/// ```
|
||||
#[clippy::version = "pre 1.29.0"]
|
||||
pub UNUSED_IO_AMOUNT,
|
||||
correctness,
|
||||
|
Loading…
Reference in New Issue
Block a user