summary refs log tree commit diff stats
path: root/lib/pure/collections/chains.nim
diff options
context:
space:
mode:
authoree7 <45465154+ee7@users.noreply.github.com>2020-08-07 22:54:34 +0200
committerGitHub <noreply@github.com>2020-08-07 22:54:34 +0200
commit6f482ab9346230f8e9c24f71091bcd5ca2cb41f8 (patch)
tree34f648e222f9cfbaa34297c2cff3674a79284951 /lib/pure/collections/chains.nim
parenta528382e057780845585f0befa6da505462a622e (diff)
downloadNim-6f482ab9346230f8e9c24f71091bcd5ca2cb41f8.tar.gz
deques.nim: Refactor the `toDeque` functionality (#15166)
This commit polishes the new proc introduced by d9ed816b10a6.

Changes:
- Rename to `toDeque` for more consistency with well-known procs like
  `toHashSet` and `toTable`.
- Rename the `openArray` parameter. The name `arr` was potentially less
  clear given that the proc can be used with a seq (or string).
- Add a `since` annotation.
- Reword the doc comment, and clarify that ordering is preserved.
- Add runnableExamples.
- Add "see also" cross linking between `initDeque` and `toDeque`.
- Remove duplicate `nextPowerOfTwo`. The `initImpl` template already
  includes it.
- Implement the proc using the `items` iterator, rather than indexing.
  This matches the implementation of `sets.toHashSet` and
  `tables.toTable`.
- Add a test within `when isMainModule`.
- Add a changelog entry.
Diffstat (limited to 'lib/pure/collections/chains.nim')
0 files changed, 0 insertions, 0 deletions