diff options
| author | alexey semenyuk <alexsemenyuk88@gmail.com> | 2024-07-30 22:34:56 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-30 22:34:56 +0500 |
| commit | 8bf5a8332244dfc57cbd608ece30929ff44b7316 (patch) | |
| tree | 88f444c942f15dff646650eb4b77c66512991f61 | |
| parent | 8f3cfb4974898c5575f4fc7d029798657bb47368 (diff) | |
| download | rust-8bf5a8332244dfc57cbd608ece30929ff44b7316.tar.gz rust-8bf5a8332244dfc57cbd608ece30929ff44b7316.zip | |
Fix example
| -rw-r--r-- | clippy_lints/src/unused_io_amount.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clippy_lints/src/unused_io_amount.rs b/clippy_lints/src/unused_io_amount.rs index 448946bd66d..cfc4ea46bdb 100644 --- a/clippy_lints/src/unused_io_amount.rs +++ b/clippy_lints/src/unused_io_amount.rs @@ -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, |
