-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(l2): forbid index slicing #1344
Conversation
25ac57b
to
6b98ba2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left some nits.
6b98ba2
to
7495c84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, left 2 suggestions
886aa6f
to
bec1413
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Motivation
We should not use direct indexing
var[idx]
or direct index slicingvar[0..2]
and instead use safe alternatives and handle the errors.Description
indexing_slicing = "deny"
was added toCargo.toml
to forbid index slicing usage.l2
crateCloses #1270