Open
Conversation
Contributor Author
| miri is failing with "unknown unstable option: |
Contributor
| I think that miri cmdline option might be removed in the nightly, so it probably needs to also be removed from CI? |
Contributor Author
| Fixed CI in #373 |
Owner
| Hey @aobatact, sorry for the delay and thank you for the PR! I took a quick look and I think we're on the right path, but I've paged out a decent amount of the context here. I have a long train ride this weekend which I'll use to dive in deep here. |
| Is there some reason this needs to reuse pub enum CompactCowStr<'a> { Borrowed(&'a str), Owned(CompactString), } assert_eq!(size_of::<CompactCowStr>(), size_of::<CompactString>()); // true assert_eq!(size_of::<Option<CompactCowStr>>(), size_of::<CompactString>()); // true |
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
This pull request aims to add a new struct called
CompactCowStrto incorporate Cow forCompactString.This proposal has been previously discussed in issue #223.
Question
Reuse of
Repr:CompactCowStrreusesRepr, which may potentially impactCompactString.If
Cowflag ofLastUtf8Charleaked toCompactString, this might cause UB.Methods:
Which methods equivalent to those in
CompactStringare necessary forCompactCowStr?Inlining:
For the new method, should we inline it?
Name Discussion:
Previous pull request suggested the name
CompactCow, but considering its relationship to String, I have changed it toCompactCowStr.