about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorColin Arnott <colin@urandom.co.uk>2019-07-13 01:34:00 +0000
committerColin Arnott <colin@urandom.co.uk>2019-07-13 01:50:45 +0000
commite8e13f04b2218fbc5faa9774a1b5bba9296f3389 (patch)
treeca6c30659277b86eedf374792cc1caa62d60ee00 /src/libsyntax/parse/parser.rs
parent71f9384e3bec467158a628e2d11e77ffada16a90 (diff)
downloadrust-e8e13f04b2218fbc5faa9774a1b5bba9296f3389.tar.gz
rust-e8e13f04b2218fbc5faa9774a1b5bba9296f3389.zip
simplify std::io::Write::write rustdoc
The std::io::Write::write method currensly suggests consumers guaranteed
that `0 <= n <= buf.len()`, for `Ok(n)`, however `n` is of type `usize`
causing the compiler to emit a warning:
```
warning: comparison is useless due to type limits
 --> lib.rs:6:18
  |
6 |         Ok(n) => 0 <= n && n <= output.len(),
  |                  ^^^^^^
  |
  = note: #[warn(unused_comparisons)] on by default
```

This PR removes the suggestion to check `0 <= n` since it is moot.

r? @steveklabnik
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions