-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters