Skip to content

Commit

Permalink
feat(jvm): Return DoubleEndedIterator for InstructionList.
Browse files Browse the repository at this point in the history
Signed-off-by: dload0 <[email protected]>
  • Loading branch information
dload0 committed Oct 11, 2024
1 parent bb84684 commit d2a3731
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jvm/code/method_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ impl<'i, I> IntoIterator for &'i InstructionList<I> {

impl<I> InstructionList<I> {
/// Creates an iterator over the instructions.
pub fn iter(&self) -> impl Iterator<Item = (&ProgramCounter, &I)> {
#[must_use]
pub fn iter(&self) -> impl DoubleEndedIterator<Item = (&ProgramCounter, &I)> {
self.into_iter()
}
}
Expand Down

0 comments on commit d2a3731

Please sign in to comment.