Skip to content
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

client_pin: Add permissions #30

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

robin-nitrokey
Copy link
Member

No description provided.

@robin-nitrokey
Copy link
Member Author

The placeholders are not really nice but I don’t see a better way atm. Ideally, serde-indexed would support skipping indizes. I’ve made the placeholders private for now. This should not be a problem as we only deserialize requests and don’t construct them manually.

@sosthene-nitrokey
Copy link
Contributor

sosthene-nitrokey commented Mar 1, 2024

The placeholders are not really nice but I don’t see a better way atm. Ideally, serde-indexed would support skipping indizes. I’ve made the placeholders private for now. This should not be a problem as we only deserialize requests and don’t construct them manually.

This got me to think that if #[serde(rename = 0x07)] was supported we could get rid of serde-indexed and this would also solve the issues of SerdeIndexed being a backward compatibility footgun.

Looking at serde-rs/serde#745 it looks like this could be accepted if submitted as a PR in serde itself. This would also just work with #[serde(alias = "…")].

Edit: though there is a 2 years old open PR without maintainer feedback: serde-rs/serde#2209

@robin-nitrokey
Copy link
Member Author

Yes, that would be great. It is also annoying that serde_indexed needs to manually implement serde attributes. In this case, #[serde(skip)] would be useful.

@robin-nitrokey robin-nitrokey force-pushed the client-pin-permissions branch 2 times, most recently from 70ef1a1 to 826a3a9 Compare March 1, 2024 15:31
@robin-nitrokey robin-nitrokey merged commit 4846817 into trussed-dev:main Mar 1, 2024
4 checks passed
@robin-nitrokey robin-nitrokey deleted the client-pin-permissions branch March 1, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants