-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use updated ctap-types with references #9
Conversation
67c0952
to
d2971f3
Compare
51cc502
to
32240f8
Compare
32240f8
to
093e2fb
Compare
d8420dd
to
879d9f2
Compare
src/lib/types.rs
Outdated
for i in 0..4 { | ||
wc_magic_number[i] = arr[1 + i]; | ||
} | ||
wc_magic_number[..4].copy_from_slice(&arr[1..(4 + 1)]); |
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.
Nit: I think [1..(4 + 1)]
is a bit hard to read, I’d either use [1..5]
or, if you want to highlight that the lengths match, [1..][..4]
.
Not related to this PR, but it looks like there is a check for arr.size()
missing here?
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.
I was surprised that I didn't use [1..][..4]
, and looking at the history it looks like it came from a cargo clippy --fix
.
Will make a clippy issue to see if that can be improved.
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.
It also added wc_magic_number[..4]
that was unnecessary.
I can't merge this or add reviewer. @szszszsz can you add the core team to the maintainers? |
0354eda
to
9b81a6f
Compare
This PR uses the updated ctap-types crate that uses references rather than heapless buffers to reduce the total stack usage. See Nitrokey/ctap-types#11