dahosek / finl_unicode

Unicode support for the finl project
Apache License 2.0
13 stars 7 forks source link

Implements `PeekChar` for `Iterator<Item=char>` #13

Closed spencerwhite closed 1 year ago

spencerwhite commented 2 years ago

This probably isn't super idiomatic, but it makes the crate much more generic.

This is based on issue #12 . A few hacky things had to be done to get this to work, namely a custom HasChar trait and changing the peek_char() function return Option<char> instead of Option<&char>. All of the tests still pass (with one syntactic change), so hopefully this isn't a big deal.