@@ -179,7 +179,10 @@ impl<'a> BytesStart<'a> {
179
179
/// "`<`".
180
180
///
181
181
/// See also [`unescaped_with_custom_entities()`](#method.unescaped_with_custom_entities)
182
- #[ inline]
182
+ #[ cold]
183
+ #[ deprecated( note = "Tag names are never escaped. Attributes must be unescaped individually" ) ]
184
+ #[ allow( deprecated) ]
185
+ #[ doc( hidden) ]
183
186
pub fn unescaped ( & self ) -> Result < Cow < [ u8 ] > > {
184
187
self . make_unescaped ( None )
185
188
}
@@ -195,15 +198,19 @@ impl<'a> BytesStart<'a> {
195
198
/// The keys and values of `custom_entities`, if any, must be valid UTF-8.
196
199
///
197
200
/// See also [`unescaped()`](#method.unescaped)
198
- #[ inline]
201
+ #[ cold]
202
+ #[ deprecated( note = "Tag names are never escaped. Attributes must be unescaped individually" ) ]
203
+ #[ allow( deprecated) ]
204
+ #[ doc( hidden) ]
199
205
pub fn unescaped_with_custom_entities < ' s > (
200
206
& ' s self ,
201
207
custom_entities : & HashMap < Vec < u8 > , Vec < u8 > > ,
202
208
) -> Result < Cow < ' s , [ u8 ] > > {
203
209
self . make_unescaped ( Some ( custom_entities) )
204
210
}
205
211
206
- #[ inline]
212
+ #[ cold]
213
+ #[ deprecated( note = "Tag names are never escaped. Attributes must be unescaped individually" ) ]
207
214
fn make_unescaped < ' s > (
208
215
& ' s self ,
209
216
custom_entities : Option < & HashMap < Vec < u8 > , Vec < u8 > > > ,
@@ -221,7 +228,10 @@ impl<'a> BytesStart<'a> {
221
228
///
222
229
/// [`unescaped()`]: #method.unescaped
223
230
/// [`Reader::decode()`]: ../reader/struct.Reader.html#method.decode
224
- #[ inline]
231
+ #[ cold]
232
+ #[ deprecated( note = "Tag names are never escaped. Attributes must be unescaped individually" ) ]
233
+ #[ allow( deprecated) ]
234
+ #[ doc( hidden) ]
225
235
pub fn unescape_and_decode < B : BufRead > ( & self , reader : & Reader < B > ) -> Result < String > {
226
236
self . do_unescape_and_decode_with_custom_entities ( reader, None )
227
237
}
@@ -240,7 +250,10 @@ impl<'a> BytesStart<'a> {
240
250
/// # Pre-condition
241
251
///
242
252
/// The keys and values of `custom_entities`, if any, must be valid UTF-8.
243
- #[ inline]
253
+ #[ cold]
254
+ #[ deprecated( note = "Tag names are never escaped. Attributes must be unescaped individually" ) ]
255
+ #[ allow( deprecated) ]
256
+ #[ doc( hidden) ]
244
257
pub fn unescape_and_decode_with_custom_entities < B : BufRead > (
245
258
& self ,
246
259
reader : & Reader < B > ,
@@ -250,7 +263,10 @@ impl<'a> BytesStart<'a> {
250
263
}
251
264
252
265
#[ cfg( feature = "encoding" ) ]
253
- #[ inline]
266
+ #[ cold]
267
+ #[ deprecated( note = "Tag names are never escaped. Attributes must be unescaped individually" ) ]
268
+ #[ allow( deprecated) ]
269
+ #[ doc( hidden) ]
254
270
fn do_unescape_and_decode_with_custom_entities < B : BufRead > (
255
271
& self ,
256
272
reader : & Reader < B > ,
@@ -263,7 +279,10 @@ impl<'a> BytesStart<'a> {
263
279
}
264
280
265
281
#[ cfg( not( feature = "encoding" ) ) ]
266
- #[ inline]
282
+ #[ cold]
283
+ #[ deprecated( note = "Tag names are never escaped. Attributes must be unescaped individually" ) ]
284
+ #[ allow( deprecated) ]
285
+ #[ doc( hidden) ]
267
286
fn do_unescape_and_decode_with_custom_entities < B : BufRead > (
268
287
& self ,
269
288
reader : & Reader < B > ,
0 commit comments