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 @@ -758,7 +758,8 @@ declare_clippy_lint! {
758758 /// Instead of `.chars().enumerate()`, the correct iterator to use is `.char_indices()`, which yields byte indices.
759759 ///
760760 /// This pattern is technically fine if the strings are known to only use the ASCII subset,
761- /// but there is also no downside to just using `.char_indices()` directly.
761+ /// though in those cases it would be better to use `bytes()` directly to make the intent clearer,
762+ /// but there is also no downside to just using `.char_indices()` directly and supporting non-ASCII strings.
762763 ///
763764 /// You may also want to read the [chapter on strings in the Rust Book](https://doc.rust-lang.org/book/ch08-02-strings.html)
764765 /// which goes into this in more detail.
You can’t perform that action at this time.
0 commit comments