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

refactor: remove foundry-abi #6394

Merged
merged 13 commits into from
Nov 22, 2023
Merged

refactor: remove foundry-abi #6394

merged 13 commits into from
Nov 22, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Nov 22, 2023

Motivation

Part 2/2 of removing foundry-abi.

Follow-up to #6379

Needs alloy-rs/core#426

Solution

@DaniPopes DaniPopes marked this pull request as ready for review November 22, 2023 04:17
Comment on lines -74 to +77
FormatSpec::Hexadecimal => format!("0x{:x}", *self),
FormatSpec::Hexadecimal => {
let hex = format!("{self:x}");
format!("0x{}", hex.trim_start_matches('0'))
}
Copy link
Member Author

Choose a reason for hiding this comment

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

ruint hex fmt pitfall

assert_eq!("NaN", fmt_1("%i", &addr));
assert_eq!("NaN", fmt_1("%e", &addr));
assert_eq!("0xdEADBEeF00000000000000000000000000000000", fmt_1("%x", &addr));
assert_eq!("'0xdEADBEeF00000000000000000000000000000000'", fmt_1("%o", &addr));
Copy link
Member Author

Choose a reason for hiding this comment

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

Added hex formatting for consistency with other byte arrays

proc-macro = true
# proc-macro tests aren't fully supported by cargo-nextest archives
test = false
doc = false
Copy link
Member Author

Choose a reason for hiding this comment

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

moved all non-macro stuff to common, so flattened macros-impl into one crate

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm

@DaniPopes DaniPopes merged commit b8c50d7 into master Nov 22, 2023
20 checks passed
@DaniPopes DaniPopes deleted the dani/rm-abi-crate branch November 22, 2023 14:27
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