rust-lexical icon indicating copy to clipboard operation
rust-lexical copied to clipboard

[BUG] BytesIter should be an `unsafe trait` or private

Open Manishearth opened this issue 11 months ago • 0 comments

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.

Manishearth avatar Jul 25 '23 19:07 Manishearth