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

Add support for specifying the ID's endianness #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpalmer
Copy link

@mpalmer mpalmer commented May 24, 2023

I've got a need to specify the endianness of a discriminator, without having that propagate to substructures. Hence this little change.

Great crate, BTW; well-documented and easy to use!

Copy link
Collaborator

@wcampbell0x2a wcampbell0x2a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission, could you add tests?

@sharksforarms
Copy link
Owner

I've got a need to specify the endianness of a discriminator, without having that propagate to substructures

You've peaked my interest, is this a public data-format? Sounds funky.

@@ -203,6 +207,8 @@ impl DekuData {
Err(cerror(data.id_type.span(), "`type` only supported on enum"))
} else if data.id.is_some() {
Err(cerror(data.id.span(), "`id` only supported on enum"))
} else if data.id_endian.is_some() {
Err(cerror(data.id.span(), "`endian_id` only supported on enum"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the error message should say id_endian?

@mpalmer
Copy link
Author

mpalmer commented May 30, 2023

I've not stared at Miri output much before, but the failures I examined do not appear to be related to the changes I made.

@wcampbell0x2a
Copy link
Collaborator

I've not stared at Miri output much before, but the failures I examined do not appear to be related to the changes I made.

Yah, we really should disable those, or just disable the ones we know fail? Miri doesn't really like bitvec, and I don't think those issues will be fixed anytime soon.

wcampbell0x2a
wcampbell0x2a previously approved these changes May 30, 2023
Doesn't propagate any further down the dependency tree, *only* affects ID parsing.
@wcampbell0x2a wcampbell0x2a removed the request for review from InusualZ April 28, 2024 00:01
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.

None yet

4 participants