don't
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(atproto): remove redundant methods from `Did`

Equivalents are accessible via `Deref<Target = str>` anyway.

tjh 5eb21129 37c6741e

-31
-31
crates/atproto/src/did.rs
··· 114 114 &self.inner 115 115 } 116 116 117 - /// Returns the length of the DID in bytes. 118 - /// 119 - /// # Example 120 - /// 121 - /// ```rust 122 - /// use atproto::did::Did; 123 - /// 124 - /// let did = Did::parse("did:plc:65gha4t3avpfpzmvpbwovss7").unwrap(); 125 - /// assert_eq!(did.len(), 32); 126 - /// ``` 127 - /// 128 - #[inline] 129 - pub const fn len(&self) -> usize { 130 - self.inner.len() 131 - } 132 - 133 - /// Returns true if `self` is an empty DID, which is impossible. 134 - /// 135 - /// # Panics 136 - /// 137 - /// Panics if you've somehow managed to construct an empty [`Did`]. 138 - /// 139 - #[inline] 140 - pub const fn is_empty(&self) -> bool { 141 - assert!( 142 - !self.inner.is_empty(), 143 - "empty DID should be impossible to construct" 144 - ); 145 - false 146 - } 147 - 148 117 /// Convert to a `Box<Did>`. 149 118 pub fn into_boxed(&self) -> Box<Did> { 150 119 Did::new_boxed(self.inner.to_owned().into_boxed_str())