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:
bors 2024-08-14 08:17:18 +00:00
commit 73819440ea

View File

@ -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,