-
-
Notifications
You must be signed in to change notification settings - Fork 181
uefi: use core::net-types in public API + remove duplications #1780
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
base: main
Are you sure you want to change the base?
Conversation
uefi/src/proto/network/mod.rs
Outdated
// NOTE: We cannot impl From<IpAddress> for core::net::IpAddr | ||
// because IpAddress is a raw union, with nothing indicating | ||
// whether it should be considered v4 or v6. | ||
pub use uefi_raw::{IpAddress as EfiIpAddr, MacAddress as EfiMacAddr}; |
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.
I'm unsure about this, is there value to exposing the raw types if the rest of the public API just used the core::net
types? Folks who do need to drop down to the lower-level API can always depend on uefi-raw directly.
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.
pleas re-review
358a4c9
to
c0408f3
Compare
}; | ||
|
||
// Translate IP types back into the higher-level types. | ||
let fn_replace_ip = |core_ip: &mut Option<&mut IpAddr>, efi_ip: Option<EfiIpAddr>| { |
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.
Please note that this will be tested once #1785 is merged.
Otherwise, some users have to also pull in uefi-raw in a matching version as dependency. We however want to prevent a mix use in public API. See [0] for context. [0] https://rust-osdev.zulipchat.com/#narrow/channel/426438-uefi-rs/topic/Re-export.20.60uefi-raw.60.20from.20.60uefi.60.3F/near/545022347
This is the final step of #1575, after many pre-requisites have been merged recently.
Closes #1575
Checklist