Skip to content

Commit

Permalink
Auto merge of #13193 - alex-semenyuk:fix_doc_unused_io_amount, r=xFre…
Browse files Browse the repository at this point in the history
…dnet

Fix doc example for UNUSED_IO_AMOUNT

Cosmetic changes. Unify example for UNUSED_IO_AMOUNT

changelog: none
  • Loading branch information
bors committed Aug 14, 2024
2 parents 70457f6 + 8bf5a83 commit 7381944
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion clippy_lints/src/unused_io_amount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,18 @@ declare_clippy_lint! {
/// ```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,
Expand Down

0 comments on commit 7381944

Please sign in to comment.