Closed ExPixel closed 3 years ago
Thanks for the PR! When I have more time, I can look into this in more detail.
So I changed RegsIter
first and am holding off on making changes to the groups iterator. Just wanted to know what you think of the changes first.
So I changed
RegsIter
first and am holding off on making changes to the groups iterator. Just wanted to know what you think of the changes first.
Sorry for the ultra late comment. I think the change looks good. Please feel free to apply that same pattern to the other iterators. If you would prefer, I could merge as-is and you can make a follow-up PR.
Removed
Instructions::iter()
andInstructionIterator
. The nice thing about having a deref to a slice is that it gives you aniter()
method for free because of Rust's deref coercion. Also fixed some tests so that they use references toInsn
instead and madeInsn
cloneable as well in case someone did want anIterator<Item = Insn>
instead of anIterator<Item = &Insn>
.