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

Deprecate IpAddr, Ipv4Addr, and Ipv6Addr #1685

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

asomers
Copy link
Member

@asomers asomers commented Mar 22, 2022

Because they're redundant with types in the standard library.

Fixes #1681

@asomers asomers force-pushed the deprecate_ipaddr branch 2 times, most recently from e7c2321 to 5661f24 Compare March 22, 2022 03:52
@asomers
Copy link
Member Author

asomers commented Mar 22, 2022

Ugh, apparently you can't deference a pointer in a const fn until rustc 1.57.0. Changing it to a mem::transmute only lowers the compatibility threshold to 1.56.0.

@asomers asomers requested a review from rtzoeller March 23, 2022 00:34
Copy link
Collaborator

@rtzoeller rtzoeller left a comment

Choose a reason for hiding this comment

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

I don't see a way to make ipv4addr_to_libc const in 1.46 either. The generated assembly is concise though, so I'm not overly concerned. If it is a bottleneck for someone we can evaluate providing a const version where available.

LGTM, just needs a squash.

Because they're redundant with types in the standard library.

Fixes nix-rust#1681
@asomers
Copy link
Member Author

asomers commented Mar 23, 2022

bors r=rtzoeller

@bors bors bot merged commit 3ca28f6 into nix-rust:master Mar 23, 2022
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.

Deprecate Ipv4Addr, Ipv6Addr, and IpAddr
2 participants