mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
eac0bd9da3
Stop bytes_nth from suggesting code that does not compile Fixes #10151 As discussed in the issue, this PR changes the lint in 2 ways 1. Replace `bytes().nth(n).unwrap()` with `as_bytes()[n]` 2. Replace other `bytes().nth(n)` with `as_bytes().get(n).copied()` --- changelog: Stop bytes_nth from suggesting code that does not compile in some cases |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |