File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -732,7 +732,8 @@ declare_clippy_lint! {
732
732
/// Instead of `.chars().enumerate()`, the correct iterator to use is `.char_indices()`, which yields byte indices.
733
733
///
734
734
/// This pattern is technically fine if the strings are known to only use the ASCII subset,
735
- /// but there is also no downside to just using `.char_indices()` directly.
735
+ /// though in those cases it would be better to use `bytes()` directly to make the intent clearer,
736
+ /// but there is also no downside to just using `.char_indices()` directly and supporting non-ASCII strings.
736
737
///
737
738
/// You may also want to read the [chapter on strings in the Rust Book](https://doc.rust-lang.org/book/ch08-02-strings.html)
738
739
/// which goes into this in more detail.
You can’t perform that action at this time.
0 commit comments