Skip to content

Implement Extend for Queue and both map types - #119

Open
hakarrr wants to merge 1 commit into
orium:mainfrom
hakarrr:extend-queue-maps-21
Open

hakarrr wants to merge 1 commit into
orium:mainfrom
hakarrr:extend-queue-maps-21

Conversation

@hakarrr

@hakarrr hakarrr commented Nov 3, 2026

Copy link
Copy Markdown

Related to #21. This implements the standard Extend trait for Queue, HashTrieMap and RedBlackTreeMap. It is partial progress, not a claim to close the issue: Vector already supports Extend, while List and Stack are left unchanged rather than choosing their extension ordering here.

The implementations use the existing enqueue_mut and insert_mut methods. Queues append in input order; maps replace duplicate keys in input order. Existing contents and persistent snapshots are preserved. The hash map uses its existing hasher and degree without adding a Default bound, and the implementations do not require elements, keys or values to implement Clone.

Tests cover extending populated collections, duplicate keys, empty iterators, snapshot preservation, non-Clone types, a non-Default custom hash builder with a non-default degree, and all three Sync variants.

Validation on base 42d227e plus this changeset, using a locked offline dependency resolution:

  • Default and no-default-features: 268 unit tests and 29 doc tests passed in each configuration.
  • serde: 276 unit tests and 29 doc tests passed.
  • rayon: 278 unit tests and 29 doc tests passed.
  • Rust 1.85 library check, all-targets Clippy with warnings denied, formatting and diff whitespace checks passed.
  • A separate clean extraction and patch application passed all 10 focused Extend tests, and the six published files were checked against the reviewed source.

The full hosted platform/toolchain matrix and combined all-features runtime suite were not run locally. No dependency or manifest changes are included.

Prepared and checked with AI assistance. No human code review is claimed before submission.

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>
@hakarrr

hakarrr commented Nov 10, 2026

Copy link
Copy Markdown
Author

Hi, checking in on this and #118. Is there anything you would like changed before they can be reviewed? Happy to adjust or add cases. Thanks!

@orium

orium commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Hi. I don't have a lot of free time currently, but when I do I'll give a round of reviews of all PRs/issues.

@hakarrr

hakarrr commented Nov 13, 2026

Copy link
Copy Markdown
Author

Thanks for the update; I understand review time is limited. For your next review round, is this change still in scope, or is there anything you need adjusted first? No need to give a firm review date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants