Skip to content

Document logic errors from mutating stored keys and values - #454

Open
RanaPriyansh wants to merge 1 commit into
indexmap-rs:mainfrom
RanaPriyansh:docs/logic-errors-453
Open

RanaPriyansh wants to merge 1 commit into
indexmap-rs:mainfrom
RanaPriyansh:docs/logic-errors-453

Conversation

@RanaPriyansh

Copy link
Copy Markdown

The main IndexMap and IndexSet documentation does not describe the logic errors already documented by MutableKeys and MutableValues.

Add type-level sections that explain how changing a stored key or value's hash or equality behavior can break lookup and uniqueness invariants. Link the existing mutable traits and retain their memory-safety distinction. No runtime behavior changes.

Related to #453.

Verification with Rust 1.94.1:

  • RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --all-features
  • cargo test --doc --all-features
  • cargo clippy --all-features
  • cargo fmt --all -- --check

The rendered sections and trait links were also checked. AI-assisted implementation and verification; independent agent review. The full CI platform matrix was not run locally.

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