fix: [manual_memcpy] reduce indexing suggestions when array length is equal to loop range - #11778
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @blyxyas (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
blyxyas
left a comment
There was a problem hiding this comment.
Pretty good first iteration, just some minor fixes and I think this should be merge-ready!
4e85e41 to
cb528e7
Compare
|
It appears that the |
…oop range Format refactor: extract function to shrink function length fix: remove cmp to calculate range fix: replace if_chain with let chains
cb528e7 to
a9d42e6
Compare
|
I squashed my commits into one, and I really appreciate your guidance! |
|
@bors r+ |
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes: #11689
This PR improves
manual_memcpysuggestions by reducing unnecessary indexing.For example,
Clippy suggests
dest[..4].copy_from_slice(&src[..4]);.I reduced this suggestion as
dest.copy_from_slice(&src[..4]);. (Removed needless indexing.)changelog: [
manual_memcpy]: Reduce indexing suggestions when array length is equal to loop range