Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
843: Add PoolArray::to_vec(), improve doc around read()/write() r=Bromeon a=Bromeon Closes #806. I noticed that the documentation around the `read()` and `write()` methods was a bit lacking, and tried to make it a bit easier to understand. Also moved trait `impl`s after the inherent `impl`. I'm not 100% sure that we really need `to_vec()`. It's nice as a convenience, but it may cause people to do things like ```rs pool_array.to_vec().map(...).collect() // or for elem in pool_array.to_vec() ``` instead of going via `read()`. After all, `read().to_vec()` is not much longer. On the other hand, we already have `PoolArray::from_vec()`, so it's somewhat symmetric. I'd be happy for some input on that. Co-authored-by: Jan Haller <bromeon@gmail.com>
- Loading branch information
Showing
2 changed files
with
105 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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