-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Correctly estimate the required space for string in StyledBuffer::prepend
#65120
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Conversation
This file contains hidden or 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
`.len()` returns length in bytes so it overestimates the required space
...And let's just hope that it will not introduce one more stable-to-nightly regression. |
estebank
reviewed
Oct 5, 2019
r=me after testing locally against the three cases requested. |
With combining character:
With zero width character (there is a zero-width non-joiner between
With full-width characters:
With example from Manish's blog:
Kudos to @kpp for actually carrying out the check. |
@bors r+ |
📌 Commit 4414068 has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Oct 7, 2019
Correctly estimate the required space for string in `StyledBuffer::prepend` Fix rust-lang#65119 r? @estebank
Centril
added a commit
to Centril/rust
that referenced
this pull request
Oct 8, 2019
Correctly estimate the required space for string in `StyledBuffer::prepend` Fix rust-lang#65119 r? @estebank
Centril
added a commit
to Centril/rust
that referenced
this pull request
Oct 8, 2019
Correctly estimate the required space for string in `StyledBuffer::prepend` Fix rust-lang#65119 r? @estebank
bors
added a commit
that referenced
this pull request
Oct 8, 2019
Rollup of 8 pull requests Successful merges: - #64404 (Add long error explanation for E0495) - #64918 (Add long error explanation for E0551) - #65102 (Disable stack probe when thread sanitizer is enabled) - #65120 (Correctly estimate the required space for string in `StyledBuffer::prepend`) - #65145 (When suggesting assoc function with type params, include turbofish) - #65162 (Remove loaded_from_cache map from DepGraph) - #65176 (Remove query-related macros) - #65179 (Add long error explanation for E0567) Failed merges: r? @ghost
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #65119
r? @estebank