-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Feat: stdlib: adds system.string.setLenUninit
#24836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
|
|
ping, would be nice to see this PR merged |
I think I was stuck on not being sure if it's done and both string versions actually work, since some of CI errors at the time were unrelated. Those string/seq impls is a mess of conditionals and I don't trust locally-run tests. |
6ca4735
to
059a3f9
Compare
Lines 2316 to 2326 in 2e45f61
Adding a |
Apart from my code review remarks, seems fine. |
So I went with expanding that early return conditional at line 232 a bit and added some internal docs. If it's still not up your alley I can change the code to whatever. If it's ok as is, do you want me to squash it? BTW, you can't currently build docs with
|
- Required for a follow-up to nim-lang#15951 - Accompanies nim-lang#19727 but for strings - Expands `stdlib/tstring` with tests for `setLen` and `setLenUninit`
1d27e21
to
bcab01b
Compare
Adds
system.setLenUninit
for thestring
type. Allows setting length without initializing new memory on growth.add(a: var string, b: openArray[char])
#15951setLenUninit
for seqsv2 #22767 (refnewSeqUninitialized
over-constrained,setLenUninitialized
missing #19727) but for stringsstdlib/tstring
with tests forsetLen
andsetLenUninit