-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce function
collect_as
for construction from an iterator (#48)
* introduce function `collect_as` for construction from an iterator Makes constructing `FixedSizeArray`s more convenient! Inspired by JuliaLang/julia#36288 This currently ignores `Base.IteratorElType`, xref https://discourse.julialang.org/t/i-dont-get-base-iteratoreltype/113604 The allocations in some code paths are probably excessive/could be optimized. But I guess this is good for a start. Fixes #20 * also test an iterator with `BigInt`-valued `size` and `length` * remove the premature optimization for `AbstractArray` * improve tests * add to the Readme * whitespace/formatting fix * delete two useless `nothing` lines One of these wasn't being recorded by code coverage (another Julia coverage bug, I guess). * simplify a bit
- Loading branch information
Showing
3 changed files
with
265 additions
and
0 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
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