]> git.lizzy.rs Git - rust.git/commit
Make `Directory::path` a `Cow`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 18 May 2018 06:19:35 +0000 (16:19 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Fri, 18 May 2018 12:20:33 +0000 (22:20 +1000)
commitad471452ba6fbbf91ad566dc4bdf1033a7281811
tree4283b14578ef76334ee4dfc9eaf6bd71ed8ffa98
parentfcf2b24e1bafb66f87c4aa03cabac839032d9ad1
Make `Directory::path` a `Cow`.

Because we create a lot of these in the macro parser, but only very
rarely modify them.

This speeds up some html5ever runs by 2--3%.
src/libsyntax/ext/tt/macro_rules.rs
src/libsyntax/parse/mod.rs
src/libsyntax/parse/parser.rs
src/libsyntax/tokenstream.rs