about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-10-10 07:29:02 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-10-14 09:14:39 +1100
commit5c93492da914f972fb549e95db778adcbdf70480 (patch)
treec80325183ecf62fe27acb5444fc27d255e8180b2 /src/libsyntax/parse/parser
parent20cc75272619cc452e3ae6c131e61974f6aa9929 (diff)
downloadrust-5c93492da914f972fb549e95db778adcbdf70480.tar.gz
rust-5c93492da914f972fb549e95db778adcbdf70480.zip
Remove the `Option` in `TokenStream`.
It means an allocation is required to create an empty `TokenStream`, but
all other operations are simpler and marginally faster due to not having
to check for `None`. Overall it simplifies the code for a negligible
performance effect.

The commit also removes `TokenStream::empty` by implementing `Default`,
which is now possible.
Diffstat (limited to 'src/libsyntax/parse/parser')
0 files changed, 0 insertions, 0 deletions