diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-10 07:29:02 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-14 09:14:39 +1100 |
| commit | 5c93492da914f972fb549e95db778adcbdf70480 (patch) | |
| tree | c80325183ecf62fe27acb5444fc27d255e8180b2 /src/libsyntax/parse/parser | |
| parent | 20cc75272619cc452e3ae6c131e61974f6aa9929 (diff) | |
| download | rust-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
