Added grow_fn and retain to Vec#13274
Closed
pongad wants to merge 1 commit intorust-lang:masterfrom
pongad:vec_add_grow
Closed
Added grow_fn and retain to Vec#13274pongad wants to merge 1 commit intorust-lang:masterfrom pongad:vec_add_grow
pongad wants to merge 1 commit intorust-lang:masterfrom
pongad:vec_add_grow
Conversation
Contributor
|
These need some tests. |
Contributor
Author
|
My uninformed opinion is that the two functions are pretty simple and all the tests they need are in the examples. Should I add more? What kind of tests? |
src/libstd/vec.rs
Outdated
Member
There was a problem hiding this comment.
The documentation claims that it starts from 0, but this example claims otherwise.
I would recommend being sure to run the doc tests, they may find bugs!
Member
|
I would also like to see some unit tests for these functions, in addition to the doc examples |
Contributor
Author
|
I'm not sure why the Examples did not get tested. Added tests at the end of the module, I made sure those run. |
Contributor
Author
|
Rebased |
Jarcho
pushed a commit
to Jarcho/rust
that referenced
this pull request
Aug 24, 2024
…Frednet Fix code snippet in from_str_radix_10 docs `<expression>` was being treated as an opening HTML tag changelog: none
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.
Fixes #13249