Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syntax: Avoid reallocating or copying in CodeMap::new_filemap
Avoid creating a new String when there is no BOM to strip, and otherwises use .drain(..3) to strip the BOM using the same allocation.
- Loading branch information
Ulrik Sverdrup
committed
May 1, 2015
1 parent
ee48e6d
commit da03c9d
Showing
2 changed files
with
5 additions
and
8 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
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