From 1027be960852618915014f9ba6e6632bd4999b0e Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 19 Sep 2022 22:53:25 +0800 Subject: [PATCH] feat: `interrupt::Iter` now allows accessing the inner iterator without consumption. (#470) This is useful if these provide additional out-of-band information. --- git-repository/src/interrupt.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git-repository/src/interrupt.rs b/git-repository/src/interrupt.rs index 39fd259f7f..070a95ea71 100644 --- a/git-repository/src/interrupt.rs +++ b/git-repository/src/interrupt.rs @@ -82,6 +82,11 @@ where pub fn into_inner(self) -> I { self.inner.inner } + + /// Return the inner iterator as reference + pub fn inner(&self) -> &I { + &self.inner.inner + } } impl Iterator for Iter