From 5b7ab472d44396b96ebfa38089e97ef9320b1798 Mon Sep 17 00:00:00 2001 From: David Hoppenbrouwers Date: Fri, 9 Sep 2022 18:36:34 +0200 Subject: [PATCH] Fix Drop impl for Collection not iterating collection --- usb_hid_item/src/tree.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usb_hid_item/src/tree.rs b/usb_hid_item/src/tree.rs index 3da24d5..830a0c7 100644 --- a/usb_hid_item/src/tree.rs +++ b/usb_hid_item/src/tree.rs @@ -151,7 +151,7 @@ impl<'a, 'p> Iterator for Collection<'a, 'p> { impl Drop for Collection<'_, '_> { fn drop(&mut self) { - //while matches!(self.next(), Some(Ok(_))) {} + while matches!(self.next(), Some(Ok(_))) {} } }