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

allow passing an iterator into prefix searches, insted of a slice. #36

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

Conversation

urisinger
Copy link

This PR improves the prefix search functionality by enabling it to accept iterators as input. This change allows you to pass a &mut Iterator to a prefix search, advancing the iterator until a match is found. while also allowing you to pass regular slices.

@shanecelis
Copy link
Collaborator

I have made a change like this myself but wasn't happy about losing the string ergonomics. With this patch, you have to specify whether you're using .bytes() or .chars() for every string, is that right?

@urisinger
Copy link
Author

I have made a change like this myself but wasn't happy about losing the string ergonomics. With this patch, you have to specify whether you're using .bytes() or .chars() for every string, is that right?

Yes, and I'm almost certain it's the only way to do it without manually implementing a trait for a bunch of common types.

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