From fbb4e0d8571541cd747b9bf7746c2b54c87f9e7e Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Thu, 22 Jun 2023 08:31:34 -0600 Subject: [PATCH] uefi: guid: Deprecate GuidKind 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 --- crates/uefi/src/guid.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/uefi/src/guid.rs b/crates/uefi/src/guid.rs index 355b39c..6817b4a 100644 --- a/crates/uefi/src/guid.rs +++ b/crates/uefi/src/guid.rs @@ -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, @@ -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,