@@ -144,7 +144,7 @@ impl Uuid {
144
144
}
145
145
}
146
146
147
- const fn try_parse ( input : & [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid > {
147
+ const fn try_parse ( input : & ' _ [ u8 ] ) -> Result < [ u8 ; 16 ] , InvalidUuid < ' _ > > {
148
148
match ( input. len ( ) , input) {
149
149
// Inputs of 32 bytes must be a non-hyphenated UUID
150
150
( 32 , s) => parse_simple ( s) ,
@@ -164,7 +164,7 @@ const fn try_parse(input: &[u8]) -> Result<[u8; 16], InvalidUuid> {
164
164
165
165
#[ inline]
166
166
#[ 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 < ' _ > > {
168
168
if let ( 38 , [ b'{' , s @ .., b'}' ] ) = ( input. len ( ) , input) {
169
169
parse_hyphenated ( s)
170
170
} else {
@@ -174,7 +174,7 @@ pub(crate) const fn parse_braced(input: &[u8]) -> Result<[u8; 16], InvalidUuid>
174
174
175
175
#[ inline]
176
176
#[ 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 < ' _ > > {
178
178
if let ( 45 , [ b'u' , b'r' , b'n' , b':' , b'u' , b'u' , b'i' , b'd' , b':' , s @ ..] ) =
179
179
( input. len ( ) , input)
180
180
{
@@ -185,7 +185,7 @@ pub(crate) const fn parse_urn(input: &[u8]) -> Result<[u8; 16], InvalidUuid> {
185
185
}
186
186
187
187
#[ 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 < ' _ > > {
189
189
// This length check here removes all other bounds
190
190
// checks in this function
191
191
if s. len ( ) != 32 {
@@ -217,7 +217,7 @@ pub(crate) const fn parse_simple(s: &[u8]) -> Result<[u8; 16], InvalidUuid> {
217
217
}
218
218
219
219
#[ 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 < ' _ > > {
221
221
// This length check here removes all other bounds
222
222
// checks in this function
223
223
if s. len ( ) != 36 {
0 commit comments