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

Fix compilation with current version of Rust, and fix PatriciaTrie::lookup so it passes its tests. #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

progval
Copy link

@progval progval commented Apr 7, 2016

No description provided.

@progval progval changed the title Fix compilation with current version of Rust, and fix lookup so it passes its tests. Fix compilation with current version of Rust, and fix PatriciaTrie::lookup so it passes its tests. Apr 7, 2016
None => panic!("element does not exist"),
}
} else if k.starts_with(key) {
match children.get(&k.char_at(key.len())) {
Copy link
Owner

Choose a reason for hiding this comment

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

I think we can just change this line to match children.get(&k.chars().nth(key.len()).unwrap()) { and leave everything else as is.

@andresilva
Copy link
Owner

Hi, thank you for your PR, I just added some comments regarding your changes. 😉

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