Skip to content

Conversation

@michaelwoerister
Copy link
Member

One negative side-effect of this change is that there might be quite a bit of copying strings out of the codemap, i.e. one copy for every block that gets translated, just for taking a look at the last character of the block. If this turns out to cause a performance problem then CodeMap::span_to_snippet() could be changed return Option<&str> instead of Option<String>.

Fixes #18791

@michaelwoerister
Copy link
Member Author

I just rebased this. I don't think the failure from before had anything to do with this PR.

bors added a commit that referenced this pull request Dec 2, 2014
…richton

One negative side-effect of this change is that there might be quite a bit of copying strings out of the codemap, i.e. one copy for every block that gets translated, just for taking a look at the last character of the block. If this turns out to cause a performance problem then `CodeMap::span_to_snippet()` could be changed return `Option<&str>` instead of `Option<String>`.

Fixes #18791
@bors bors closed this Dec 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues with non-ascii identifiers

3 participants