Skip to content

Commit

Permalink
uefi: guid: Deprecate GuidKind
Browse files Browse the repository at this point in the history
Have users compare GUID values directly. This will remove the need to
have all GUIDs defined within the GUID module itself, and can later be
defined within the module for the protocol they define.

Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Jun 10, 2024
1 parent 19e7268 commit fbb4e0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/uefi/src/guid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ pub const COMPONENT_NAME2_GUID: Guid = guid!("6a7a5cff-e8d9-4f70-bada-75ab3025ce
#[repr(C)]
pub struct Guid(pub u32, pub u16, pub u16, pub [u8; 8]);

#[deprecated(note = "use `Guid` directly")]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum GuidKind {
Null,
Expand Down Expand Up @@ -172,6 +173,8 @@ impl Guid {
Self(d1, d2, d3, d4)
}

#[allow(deprecated)]
#[deprecated(note = "compare `Guid`s directly")]
pub fn kind(&self) -> GuidKind {
match *self {
NULL_GUID => GuidKind::Null,
Expand Down

0 comments on commit fbb4e0d

Please sign in to comment.