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

Migrate Bytes to u128 internally #515

Closed
wants to merge 3 commits into from

Conversation

jbaublitz
Copy link
Member

Add support in macros for u128 internal representation in unit structs. Move Bytes over to u128.

There is a fair amount of added code and duplication in the macros as you cannot capture a type as a variable and then pattern match on it in a submacro so the types must be literals throughout the path travelled by the macro call stack. I would keep them all as variables if I didn't need to differentiate between .serialize_u64() and .serialize_u128() in the serde_macro!() body.

@mulkieran
Copy link
Member

Must defer consideration until November...

@mulkieran
Copy link
Member

Moving to December along w/ companion PR.

@jbaublitz
Copy link
Member Author

I've added some significant macro clean up to what I originally did.

@jbaublitz
Copy link
Member Author

Rebased.

@jbaublitz
Copy link
Member Author

CI is repeatedly failing due to #557

@jbaublitz
Copy link
Member Author

This should also be ready due to rust-lang/rfcs#1504.

Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

This looks generally good. I'm going over Mul, Div, and Rem very closely, as they are the most tricky for dimensionality and I've noted what looks like a problem w/ mul macro.

src/range_macros.rs Show resolved Hide resolved
@mulkieran
Copy link
Member

Looks good. Moving to pending while I do review of stratisd part: stratis-storage/stratisd#2341.

Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

Ok, looks ready! Please close this and open a PR for final review.

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.

2 participants