Avoid an unnecessary clone in generic_extensions.
This avoids ~800,000 allocations in html5ever.
This commit is contained in:
parent
a935481ae9
commit
e382267cfb
1 changed files with 2 additions and 2 deletions
|
|
@ -139,9 +139,9 @@ fn generic_extension<'cx>(cx: &'cx ExtCtxt,
|
|||
macro_ident: name
|
||||
})
|
||||
}
|
||||
Failure(sp, ref msg) => if sp.lo >= best_fail_spot.lo {
|
||||
Failure(sp, msg) => if sp.lo >= best_fail_spot.lo {
|
||||
best_fail_spot = sp;
|
||||
best_fail_msg = (*msg).clone();
|
||||
best_fail_msg = msg;
|
||||
},
|
||||
Error(err_sp, ref msg) => {
|
||||
cx.span_fatal(err_sp.substitute_dummy(sp), &msg[..])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue