File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -1328,31 +1328,13 @@ impl LangString {
1328
1328
}
1329
1329
}
1330
1330
1331
- trait WriteSpec {
1332
- fn reserve_spec ( & mut self , additional : usize ) ;
1333
- }
1334
-
1335
- impl < W : fmt:: Write > WriteSpec for W {
1336
- #[ inline]
1337
- default fn reserve_spec ( & mut self , _additional : usize ) { }
1338
- }
1339
-
1340
- impl < ' a > WriteSpec for & ' a mut String {
1341
- #[ inline]
1342
- fn reserve_spec ( & mut self , additional : usize ) {
1343
- self . reserve ( additional) ;
1344
- }
1345
- }
1346
-
1347
1331
impl < ' a > Markdown < ' a > {
1348
- pub fn write_into ( self , mut f : impl fmt:: Write ) -> fmt:: Result {
1332
+ pub fn write_into ( self , f : impl fmt:: Write ) -> fmt:: Result {
1349
1333
// This is actually common enough to special-case
1350
1334
if self . content . is_empty ( ) {
1351
1335
return Ok ( ( ) ) ;
1352
1336
}
1353
1337
1354
- f. reserve_spec ( self . content . len ( ) * 3 / 2 ) ;
1355
-
1356
1338
html:: write_html_fmt ( f, self . into_iter ( ) )
1357
1339
}
1358
1340
@@ -1492,8 +1474,6 @@ impl MarkdownItemInfo<'_> {
1492
1474
_ => event,
1493
1475
} ) ;
1494
1476
1495
- f. reserve_spec ( md. len ( ) * 3 / 2 ) ;
1496
-
1497
1477
ids. handle_footnotes ( |ids, existing_footnotes| {
1498
1478
let p = HeadingLinks :: new ( p, None , ids, HeadingOffset :: H1 ) ;
1499
1479
let p = footnotes:: Footnotes :: new ( p, existing_footnotes) ;
You can’t perform that action at this time.
0 commit comments