-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support multiple fields to id
#315
Conversation
Never-mind, this doesn't work considering
|
Benchmark for 45ad68aClick to view benchmark
|
735d484
to
1ec9b25
Compare
id
- Add use of multiple id's from ctx in enums by expanding the match statement to tuples
1ec9b25
to
d10ce5e
Compare
Benchmark for f7ed986Click to view benchmark
|
Benchmark for c778eedClick to view benchmark
|
@@ -105,36 +105,72 @@ fn test_top_level_ctx_enum_default() { | |||
#[test] | |||
fn test_struct_enum_ctx_id() { | |||
#[derive(PartialEq, Debug, DekuRead, DekuWrite)] | |||
#[deku(ctx = "my_id: u8", id = "my_id")] | |||
#[deku(ctx = "my_id: u8, data: usize", id = "my_id, data")] |
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.
We might want to duplicate the test? (one tuple, one non-tuple)
Benchmark for ae7d5c9Click to view benchmark
|
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.
Thanks! 🙏
statement to tuples