Skip to content

doc: Update modules for containers #13748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/doc/guide-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ just unique keys without a corresponding value. The `Map` and `Set` traits in

The standard library provides three owned map/set types:

* `std::hashmap::HashMap` and `std::hashmap::HashSet`, requiring the keys to
* `collections::HashMap` and `collections::HashSet`, requiring the keys to
implement `Eq` and `Hash`
* `std::trie::TrieMap` and `std::trie::TrieSet`, requiring the keys to be `uint`
* `extra::treemap::TreeMap` and `extra::treemap::TreeSet`, requiring the keys
* `collections::TrieMap` and `collections::TrieSet`, requiring the keys to be `uint`
* `collections::TreeMap` and `collections::TreeSet`, requiring the keys
to implement `TotalOrd`

These maps do not use managed pointers so they can be sent between tasks as
Expand All @@ -42,19 +42,19 @@ implementing the `Hash` trait.

## Double-ended queues

The `extra::ringbuf` module implements a double-ended queue with `O(1)`
The `collections::ringbuf` module implements a double-ended queue with `O(1)`
amortized inserts and removals from both ends of the container. It also has
`O(1)` indexing like a vector. The contained elements are not required to be
copyable, and the queue will be sendable if the contained type is sendable.
Its interface `Deque` is defined in `extra::collections`.
Its interface `Deque` is defined in `collections`.

The `extra::dlist` module implements a double-ended linked list, also
implementing the `Deque` trait, with `O(1)` removals and inserts at either end,
and `O(1)` concatenation.

## Priority queues

The `extra::priority_queue` module implements a queue ordered by a key. The
The `collections::priority_queue` module implements a queue ordered by a key. The
contained elements are not required to be copyable, and the queue will be
sendable if the contained type is sendable.

Expand Down