@@ -183,7 +183,7 @@ impl<'a> BytesStart<'a> {
183
183
/// ```
184
184
///
185
185
/// [`to_end`]: Self::to_end
186
- pub fn borrow ( & self ) -> BytesStart {
186
+ pub fn borrow ( & self ) -> BytesStart < ' _ > {
187
187
BytesStart {
188
188
buf : Cow :: Borrowed ( & self . buf ) ,
189
189
name_len : self . name_len ,
@@ -193,7 +193,7 @@ impl<'a> BytesStart<'a> {
193
193
194
194
/// Creates new paired close tag
195
195
#[ inline]
196
- pub fn to_end ( & self ) -> BytesEnd {
196
+ pub fn to_end ( & self ) -> BytesEnd < ' _ > {
197
197
BytesEnd :: from ( self . name ( ) )
198
198
}
199
199
@@ -213,7 +213,7 @@ impl<'a> BytesStart<'a> {
213
213
214
214
/// Gets the undecoded raw tag name, as present in the input stream.
215
215
#[ inline]
216
- pub fn name ( & self ) -> QName {
216
+ pub fn name ( & self ) -> QName < ' _ > {
217
217
QName ( & self . buf [ ..self . name_len ] )
218
218
}
219
219
@@ -222,7 +222,7 @@ impl<'a> BytesStart<'a> {
222
222
///
223
223
/// All content up to and including the first `:` character is removed from the tag name.
224
224
#[ inline]
225
- pub fn local_name ( & self ) -> LocalName {
225
+ pub fn local_name ( & self ) -> LocalName < ' _ > {
226
226
self . name ( ) . into ( )
227
227
}
228
228
@@ -283,12 +283,12 @@ impl<'a> BytesStart<'a> {
283
283
}
284
284
285
285
/// Returns an iterator over the attributes of this tag.
286
- pub fn attributes ( & self ) -> Attributes {
286
+ pub fn attributes ( & self ) -> Attributes < ' _ > {
287
287
Attributes :: wrap ( & self . buf , self . name_len , false , self . decoder )
288
288
}
289
289
290
290
/// Returns an iterator over the HTML-like attributes of this tag (no mandatory quotes or `=`).
291
- pub fn html_attributes ( & self ) -> Attributes {
291
+ pub fn html_attributes ( & self ) -> Attributes < ' _ > {
292
292
Attributes :: wrap ( & self . buf , self . name_len , true , self . decoder )
293
293
}
294
294
@@ -432,15 +432,15 @@ impl<'a> BytesEnd<'a> {
432
432
433
433
/// Converts the event into a borrowed event.
434
434
#[ inline]
435
- pub fn borrow ( & self ) -> BytesEnd {
435
+ pub fn borrow ( & self ) -> BytesEnd < ' _ > {
436
436
BytesEnd {
437
437
name : Cow :: Borrowed ( & self . name ) ,
438
438
}
439
439
}
440
440
441
441
/// Gets the undecoded raw tag name, as present in the input stream.
442
442
#[ inline]
443
- pub fn name ( & self ) -> QName {
443
+ pub fn name ( & self ) -> QName < ' _ > {
444
444
QName ( & self . name )
445
445
}
446
446
@@ -449,7 +449,7 @@ impl<'a> BytesEnd<'a> {
449
449
///
450
450
/// All content up to and including the first `:` character is removed from the tag name.
451
451
#[ inline]
452
- pub fn local_name ( & self ) -> LocalName {
452
+ pub fn local_name ( & self ) -> LocalName < ' _ > {
453
453
self . name ( ) . into ( )
454
454
}
455
455
}
@@ -571,7 +571,7 @@ impl<'a> BytesText<'a> {
571
571
572
572
/// Converts the event into a borrowed event.
573
573
#[ inline]
574
- pub fn borrow ( & self ) -> BytesText {
574
+ pub fn borrow ( & self ) -> BytesText < ' _ > {
575
575
BytesText {
576
576
content : Cow :: Borrowed ( & self . content ) ,
577
577
decoder : self . decoder ,
@@ -792,7 +792,7 @@ impl<'a> BytesCData<'a> {
792
792
793
793
/// Converts the event into a borrowed event.
794
794
#[ inline]
795
- pub fn borrow ( & self ) -> BytesCData {
795
+ pub fn borrow ( & self ) -> BytesCData < ' _ > {
796
796
BytesCData {
797
797
content : Cow :: Borrowed ( & self . content ) ,
798
798
decoder : self . decoder ,
@@ -1070,7 +1070,7 @@ impl<'a> BytesPI<'a> {
1070
1070
1071
1071
/// Converts the event into a borrowed event.
1072
1072
#[ inline]
1073
- pub fn borrow ( & self ) -> BytesPI {
1073
+ pub fn borrow ( & self ) -> BytesPI < ' _ > {
1074
1074
BytesPI {
1075
1075
content : self . content . borrow ( ) ,
1076
1076
}
@@ -1140,7 +1140,7 @@ impl<'a> BytesPI<'a> {
1140
1140
/// }
1141
1141
/// ```
1142
1142
#[ inline]
1143
- pub fn attributes ( & self ) -> Attributes {
1143
+ pub fn attributes ( & self ) -> Attributes < ' _ > {
1144
1144
self . content . attributes ( )
1145
1145
}
1146
1146
}
@@ -1300,7 +1300,7 @@ impl<'a> BytesDecl<'a> {
1300
1300
/// ```
1301
1301
///
1302
1302
/// [grammar]: https://www.w3.org/TR/xml11/#NT-XMLDecl
1303
- pub fn version ( & self ) -> Result < Cow < [ u8 ] > , Error > {
1303
+ pub fn version ( & self ) -> Result < Cow < ' _ , [ u8 ] > , Error > {
1304
1304
// The version *must* be the first thing in the declaration.
1305
1305
match self . content . attributes ( ) . with_checks ( false ) . next ( ) {
1306
1306
Some ( Ok ( a) ) if a. key . as_ref ( ) == b"version" => Ok ( a. value ) ,
@@ -1355,7 +1355,7 @@ impl<'a> BytesDecl<'a> {
1355
1355
/// ```
1356
1356
///
1357
1357
/// [grammar]: https://www.w3.org/TR/xml11/#NT-XMLDecl
1358
- pub fn encoding ( & self ) -> Option < Result < Cow < [ u8 ] > , AttrError > > {
1358
+ pub fn encoding ( & self ) -> Option < Result < Cow < ' _ , [ u8 ] > , AttrError > > {
1359
1359
self . content
1360
1360
. try_get_attribute ( "encoding" )
1361
1361
. map ( |a| a. map ( |a| a. value ) )
@@ -1397,7 +1397,7 @@ impl<'a> BytesDecl<'a> {
1397
1397
/// ```
1398
1398
///
1399
1399
/// [grammar]: https://www.w3.org/TR/xml11/#NT-XMLDecl
1400
- pub fn standalone ( & self ) -> Option < Result < Cow < [ u8 ] > , AttrError > > {
1400
+ pub fn standalone ( & self ) -> Option < Result < Cow < ' _ , [ u8 ] > , AttrError > > {
1401
1401
self . content
1402
1402
. try_get_attribute ( "standalone" )
1403
1403
. map ( |a| a. map ( |a| a. value ) )
@@ -1426,7 +1426,7 @@ impl<'a> BytesDecl<'a> {
1426
1426
1427
1427
/// Converts the event into a borrowed event.
1428
1428
#[ inline]
1429
- pub fn borrow ( & self ) -> BytesDecl {
1429
+ pub fn borrow ( & self ) -> BytesDecl < ' _ > {
1430
1430
BytesDecl {
1431
1431
content : self . content . borrow ( ) ,
1432
1432
}
@@ -1523,7 +1523,7 @@ impl<'a> BytesRef<'a> {
1523
1523
1524
1524
/// Converts the event into a borrowed event.
1525
1525
#[ inline]
1526
- pub fn borrow ( & self ) -> BytesRef {
1526
+ pub fn borrow ( & self ) -> BytesRef < ' _ > {
1527
1527
BytesRef {
1528
1528
content : Cow :: Borrowed ( & self . content ) ,
1529
1529
decoder : self . decoder ,
@@ -1703,7 +1703,7 @@ impl<'a> Event<'a> {
1703
1703
1704
1704
/// Converts the event into a borrowed event.
1705
1705
#[ inline]
1706
- pub fn borrow ( & self ) -> Event {
1706
+ pub fn borrow ( & self ) -> Event < ' _ > {
1707
1707
match self {
1708
1708
Event :: Start ( e) => Event :: Start ( e. borrow ( ) ) ,
1709
1709
Event :: End ( e) => Event :: End ( e. borrow ( ) ) ,
0 commit comments