diff options
| author | Andrea Canciani <ranma42@gmail.com> | 2015-12-30 21:45:24 +0100 |
|---|---|---|
| committer | Andrea Canciani <ranma42@gmail.com> | 2016-01-28 15:13:42 +0100 |
| commit | 2fd2670ea0a55b7f7481c5ce2a95c5c5033941d5 (patch) | |
| tree | 58670df4b48fe6bca30943a4362254a3318b4f1e /src/libsyntax/errors | |
| parent | 035f4cca00d20fcf889c8c588125cd07b632a476 (diff) | |
| download | rust-2fd2670ea0a55b7f7481c5ce2a95c5c5033941d5.tar.gz rust-2fd2670ea0a55b7f7481c5ce2a95c5c5033941d5.zip | |
Unify computation of length in `EscapeUnicode`
The `offset` value was computed both in `next` and in `size_hint`; computing it in a single place ensures consistency and makes it easier to apply improvements. The value is now computed as soon as the iterator is constructed. This means that the time to compute it is spent immediately and cannot be avoided, but it also guarantees that it is only spent once.
Diffstat (limited to 'src/libsyntax/errors')
0 files changed, 0 insertions, 0 deletions
