Skip to content
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

Document trie collections #15942

Closed
wants to merge 2 commits into from
Closed

Document trie collections #15942

wants to merge 2 commits into from

Conversation

treeman
Copy link
Contributor

@treeman treeman commented Jul 24, 2014

I'm a bit unsure over the map instantiations

let map: TrieMap<&str> = [(1, "a"), (2, "b"), (3, "c")].iter().map(|&x| x).collect();

Seems a bit long and ugly, but maybe it's fine?

#[allow(missing_doc)]
/// A map implemented as a radix trie.
///
/// It's a map optimized for unsigned integer keys.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just merge this into the previous sentence "... as a radix tree optimized for unsigned integer keys", or remove it entirely (since it only works with unsigned integer keys).

/// assert_eq!(map.find(&1), Some(&"Martin"));
///
/// if !map.contains_key(&90) {
/// println!("Nobody is keyed 90");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nobody has keyed 90? or maybe "There is no key 90?"

@steveklabnik
Copy link
Member

😍

@treeman treeman deleted the doc-trie branch July 25, 2014 08:04
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.

3 participants