private-attribution / ipa

A raw implementation of Interoperable Private Attribution
MIT License
39 stars 23 forks source link

Remove Dead Code from BoolIterator #1126

Closed danielmasny closed 1 month ago

danielmasny commented 1 month ago

BoolIterator caused the miri check to fail. This was fixed by allowing dead_code for BoolIterator in ipa-core/src/ff/galois_field.rs in line 142

Task: Remove the allow dead code flag, e.g. by deleting BoolIterator if it is not used anywhere.

#[allow(dead_code)]
pub struct BoolIterator<'a>(std::iter::Take<Iter<'a, u8, Lsb0>>);
impl<'a> Iterator for BoolIterator<'a> {
    type Item = bool;
    fn next(&mut self) -> Option<Self::Item> {
        self.0.next().map(|v| *v)
    }
}
danielmasny commented 1 month ago

https://github.com/private-attribution/ipa/pull/1125