mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 07:04:18 +00:00
Fix example
This commit is contained in:
parent
8f3cfb4974
commit
8bf5a83322
1 changed files with 8 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue