Add Drop impl for linked_list::DrainFilter
This commit is contained in:
parent
c8ddf28527
commit
37335d3f43
@ -1071,6 +1071,15 @@ impl<'a, T, F> Iterator for DrainFilter<'a, T, F>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[unstable(feature = "drain_filter", reason = "recently added", issue = "43244")]
|
||||||
|
impl<'a, T, F> Drop for DrainFilter<'a, T, F>
|
||||||
|
where F: FnMut(&mut T) -> bool,
|
||||||
|
{
|
||||||
|
fn drop(&mut self) {
|
||||||
|
for _ in self { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[unstable(feature = "drain_filter", reason = "recently added", issue = "43244")]
|
#[unstable(feature = "drain_filter", reason = "recently added", issue = "43244")]
|
||||||
impl<'a, T: 'a + fmt::Debug, F> fmt::Debug for DrainFilter<'a, T, F>
|
impl<'a, T: 'a + fmt::Debug, F> fmt::Debug for DrainFilter<'a, T, F>
|
||||||
where F: FnMut(&mut T) -> bool
|
where F: FnMut(&mut T) -> bool
|
||||||
|
Loading…
Reference in New Issue
Block a user