diff options
| author | Catherine Flores <catherine.3.flores@gmail.com> | 2025-03-30 17:28:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-30 17:28:17 +0000 |
| commit | 4f58673f8d1495c75aaee63c018a78589ee0a8d8 (patch) | |
| tree | 066d2fae2af8a824bcf4dc338ff67d4eaa0c35d4 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | cd67b3b77129dcc99ee18f6a16737b8b7452cf18 (diff) | |
| parent | c7390279cafacabaf18c927225751623b9da2cb1 (diff) | |
| download | rust-4f58673f8d1495c75aaee63c018a78589ee0a8d8.tar.gz rust-4f58673f8d1495c75aaee63c018a78589ee0a8d8.zip | |
new lint: `char_indices_as_byte_indices` (#13435)
Closes #10202. This adds a new lint that checks for uses of the `.chars().enumerate()` position in a context where a byte index is required and suggests changing it to use `.char_indices()` instead. I'm planning to extend this lint to also detect uses of the position in iterator chains, e.g. `s.chars().enumerate().for_each(|(i, _)| s.split_at(i));`, but that's for another time ---------------- changelog: new lint: `chars_enumerate_for_byte_indices`
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
