From 6aa657dfcbb4e25baf51b992ab028ef9d1ab5480 Mon Sep 17 00:00:00 2001 From: Metaflame Date: Wed, 18 Mar 2026 17:55:52 +0100 Subject: [PATCH] Remove commented-out methods --- src/lib.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 23e1326..8260fcc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,35 +74,6 @@ impl Did { } } - // TODO: did:plc: will now return the full 32 bytes - patch this to work with that - // /// The identifier part of the DID. - // /// - // /// Allocates a String for `did:plc` (since it is stored as bytes rather than base32). - // pub fn identifier<'a>(&'a self) -> Cow<'a, str> { - // match &self.0 { - // DidInner::Plc(bytes) => { - // let mut string = String::with_capacity(24); - // bytes_to_plc_ident_append(bytes, &mut string); - // Cow::Owned(string) - // } - // DidInner::Web { ptr, len } => { - // // SAFETY: ptr and len come from an unpacked DidWebDomain - // let web = unsafe { ManuallyDrop::new(DidWebDomain::from_raw_parts(*ptr, *len)) }; - // // SAFETY: web is not dropped, so the string slice remains valid - // // The string slice is valid for as long as &self - // let ident: &'a str = unsafe { transmute::<_, &'a str>(web.as_str()) }; - // ident.into() - // } - // DidInner::Other(other) => other.identifier.as_str().into(), - // } - // } - - // /// Constructs a [`Did`] from a plain `did:plc` identifier (only the part after `did:plc:`). - // pub fn from_plc_ident(_ident: &str) -> Option { - // todo!("Reimplement or remove") - // // plc_ident_to_bytes(ident).map(DidInner::Plc).map(Did) - // } - /// Constructs a [`Did`] directly from the identifier's bytes. pub fn from_plc_bytes(bytes: [u8; 15]) -> Self { Did(DidInner::Plc(bytes)) -- 2.51.2