Fix example

This commit is contained in:
alexey semenyuk 2024-07-30 22:34:56 +05:00 committed by GitHub
parent 8f3cfb4974
commit 8bf5a83322
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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