@@ -144,7 +144,7 @@ impl Uuid {
144144 }
145145}
146146
147- const fn try_parse ( input : & [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid > {
147+ const fn try_parse ( input : & ' _ [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid < ' _ > > {
148148 match ( input. len ( ) , input) {
149149 // Inputs of 32 bytes must be a non-hyphenated UUID
150150 ( 32 , s) => parse_simple ( s) ,
@@ -164,7 +164,7 @@ const fn try_parse(input: &[u8]) -> Result<[u8; 16], InvalidUuid> {
164164
165165#[ inline]
166166#[ allow( dead_code) ]
167- pub ( crate ) const fn parse_braced ( input : & [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid > {
167+ pub ( crate ) const fn parse_braced ( input : & ' _ [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid < ' _ > > {
168168 if let ( 38 , [ b'{' , s @ .., b'}' ] ) = ( input. len ( ) , input) {
169169 parse_hyphenated ( s)
170170 } else {
@@ -174,7 +174,7 @@ pub(crate) const fn parse_braced(input: &[u8]) -> Result<[u8; 16], InvalidUuid>
174174
175175#[ inline]
176176#[ allow( dead_code) ]
177- pub ( crate ) const fn parse_urn ( input : & [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid > {
177+ pub ( crate ) const fn parse_urn ( input : & ' _ [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid < ' _ > > {
178178 if let ( 45 , [ b'u' , b'r' , b'n' , b':' , b'u' , b'u' , b'i' , b'd' , b':' , s @ ..] ) =
179179 ( input. len ( ) , input)
180180 {
@@ -185,7 +185,7 @@ pub(crate) const fn parse_urn(input: &[u8]) -> Result<[u8; 16], InvalidUuid> {
185185}
186186
187187#[ inline]
188- pub ( crate ) const fn parse_simple ( s : & [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid > {
188+ pub ( crate ) const fn parse_simple ( s : & ' _ [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid < ' _ > > {
189189 // This length check here removes all other bounds
190190 // checks in this function
191191 if s. len ( ) != 32 {
@@ -217,7 +217,7 @@ pub(crate) const fn parse_simple(s: &[u8]) -> Result<[u8; 16], InvalidUuid> {
217217}
218218
219219#[ inline]
220- pub ( crate ) const fn parse_hyphenated ( s : & [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid > {
220+ pub ( crate ) const fn parse_hyphenated ( s : & ' _ [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid < ' _ > > {
221221 // This length check here removes all other bounds
222222 // checks in this function
223223 if s. len ( ) != 36 {
0 commit comments