Repository navigation
change ~[] -> Vec for collect() - #14992
Conversation
There was a problem hiding this comment.
I personally prefer the closure form, rather than inc_conditionally taking a reference, since I think it's clearer what is happening.
|
Also, neither of these examples are being tested automatically; I guess it might be because |
|
Sure, I'll update as mentioned. |
|
Done; the tests for these docs run now and they pass. |
There was a problem hiding this comment.
The convention is for functions to be used module-qualified, i.e. import std::option and call option::collect.
There was a problem hiding this comment.
Updated as noted. Thanks for the style tip.
|
Oh, I missed the bit about closure form. I might as well go all-out and update it, rather than doing it halfway a hundred times. |
This updates the documentation for result::collect() and option::collect() to use the new-style syntax for vectors, instead of the old ~[]. Also updates the code blocks for these docs so they will be tested automatically. closes rust-lang#14991
This updates the documentation for result::collect() and option::collect() to use the new-style syntax for owned pointers and vectors. closes #14991
This updates the documentation for result::collect() and
option::collect() to use the new-style syntax for owned pointers and
vectors.
closes #14991