rust-lexical
rust-lexical copied to clipboard
[BUG] BytesIter should be an `unsafe trait` or private
BytesIter seems to have a safety invariant:
https://github.com/Alexhuszagh/rust-lexical/blob/09c686b075096d48155cfb32265068f962afc56c/lexical-util/src/iterator.rs#L20-L22C1
This means the trait should be private or unsafe. I don't have time to craft a testcase, but it would mostly be an implementation of BytesIter that does these incorrectly and gets used elsewhere.