From 5c58eec0bd8cee8fb2a191396d5ad5b5c9b0116a Mon Sep 17 00:00:00 2001 From: Clar Charr Date: Wed, 4 Apr 2018 19:10:38 -0400 Subject: Replace manual iter exhaust with for_each(drop). --- src/libstd/collections/hash/table.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/collections') diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index 73bd5747c10..4ed1e159a0a 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -1129,7 +1129,7 @@ impl<'a, K, V> ExactSizeIterator for Drain<'a, K, V> { impl<'a, K: 'a, V: 'a> Drop for Drain<'a, K, V> { fn drop(&mut self) { - for _ in self {} + self.for_each(drop); } } -- cgit 1.4.1-3-g733a5