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

Use core::net::Ip{Addr, V4Addr, V6Addr} #60

Closed
wants to merge 1 commit into from

Conversation

akonradi-signal
Copy link

Re-export the types from the standard library instead of duplicating their code. The types have been stable since Rust 1.6 and this crate has a MSRV of 1.60.

Instead of re-exporting the equivalent types from core::net at the crate root, this change simply removes the names. This is semver-incompatible, but re-exporting types is also incompatible since a trait implementation in a consuming crate for, e.g., core::net::IpAddr and pki_types::IpAddr would now conflict.

Re-export the types from the standard library instead of duplicating
their code. The types have been stable since Rust 1.6 and this crate has
a MSRV of 1.60.

Instead of re-exporting the equivalent types from core::net at the crate
root, this change simply removes the names. This is semver-incompatible,
but re-exporting types is also incompatible since a trait implementation
in a consuming crate for, e.g., core::net::IpAddr and pki_types::IpAddr
would now conflict.
@ctz
Copy link
Member

ctz commented Oct 1, 2024

Hm, it was my understanding that it was 1.77 that stabilised core::net?

@cpu
Copy link
Member

cpu commented Oct 1, 2024

Hm, it was my understanding that it was 1.77 that stabilised core::net?

Mine too, and the MSRV CI failure hints at similar:

error[E0432]: unresolved import `core::net`
 --> src/server_name.rs:8:[11](https://github.com/rustls/pki-types/actions/runs/11127874829/job/30921355418?pr=60#step:4:12)
  |
8 | use core::net::{IpAddr, Ipv4Addr, Ipv6Addr};
  |           ^^^ could not find `net` in `core`

This is semver-incompatible

I think any semver breaking change is a tough sell for this crate. It would be nice to tidy this stuff up but IMO I don't think it merits a breaking release.

@djc
Copy link
Member

djc commented Oct 1, 2024

Hm, it was my understanding that it was 1.77 that stabilised core::net?

I think they're talking about when they were standardized in std (as opposed to core).

@akonradi-signal
Copy link
Author

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.

4 participants