-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add another flavor of permission api #15609
base: main
Are you sure you want to change the base?
Conversation
⏱️ 1h 28m total CI duration on this PR
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
16346c7
to
fc085a0
Compare
be4ea04
to
46ddd6f
Compare
fc085a0
to
6a2e87a
Compare
46ddd6f
to
0ee1c8c
Compare
6a2e87a
to
a5e92c0
Compare
0ee1c8c
to
851da1d
Compare
a5e92c0
to
60ce91a
Compare
e06ec0c
to
dd67295
Compare
if (perm.key != perm_key) { | ||
return false | ||
}; |
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.
The generic type parameter PermKey
only requires copy + drop + store
abilities, but the code uses the !=
operator which may not be supported for all possible types satisfying these constraints. To ensure type safety, consider either:
- Adding
drop + copy + store + has[std::cmp::Eq]
as the ability constraint forPermKey
, or - Using a dedicated comparison function that's guaranteed to work for the intended key types
This will prevent potential runtime errors when comparing complex key types that don't implement equality comparison.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
6494f73
to
2bd4613
Compare
dd67295
to
287f491
Compare
2bd4613
to
472be55
Compare
287f491
to
9bb1d3b
Compare
472be55
to
18a8c9a
Compare
9bb1d3b
to
84b19ea
Compare
18a8c9a
to
015bf33
Compare
84b19ea
to
646097a
Compare
015bf33
to
f9ea87a
Compare
629e352
to
83738a4
Compare
f2d1cc7
to
154c5d2
Compare
154c5d2
to
7fce8b6
Compare
2b01fae
to
75508ff
Compare
eb4b8f1
to
e4a9607
Compare
Description
How Has This Been Tested?
Key Areas to Review
Type of Change
Which Components or Systems Does This Change Impact?
Checklist