Conversation
…red by `ExactSizeIterator`
| trait IterInclusivity: 'static { | ||
| fn exhausted<T: Ord>(start: &T, end: &T) -> bool; | ||
| } | ||
| pub enum NonInclusive {} |
There was a problem hiding this comment.
Minor nitpicks: Could you please add a doc comment to these pub items? Also, the line spacing is a little inconsistent.
jounathaen
left a comment
There was a problem hiding this comment.
Very nice! Thank you for the contribution!
|
Sorry for the wait. I've added docs to the I also added some code comments where I thought they were necessary. |
|
Very nice! Once Clippy is satisfied, I'm as well 😉 I assume you are interested in a release after the merge? |
Not yet there are still a couple of things I want to add. |
|
@an-owl, can you fix the Clippy issue? Then I'd be happy to merge this :-) |
|
Ah, I didn't notice the fix. Thank you for your contribution! |
pr for #19
AddrIterto panic when iterating over non-canonical addresses.DoubleEndedIteratorandExactSizeIteratorIterator::next()0x7FFFFFFFFFFFit will stop at0x7FFFFFFFFFFE).From<Range>andFrom<RangeInclusive>forAddrIter8637ae6 requires that
MemoryAddress::RAWimplementsTryFrom<usize>, I don't really like further restricting it but it already implementsTryInto<usize>so it probably wont be an issue.There may be bugs where iterating to a non-canonical address when
add/sub_checked()returnsNone, by assuming its an overflow, when it should be checked. I think I caught them all but there might be more.