mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 01:18:18 +02:00
compiler/rust/smallvec: Implement Extend<T> for SmallVec<T>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41941>
This commit is contained in:
parent
1a34d1ed3a
commit
fb2c44bc51
1 changed files with 11 additions and 0 deletions
|
|
@ -113,3 +113,14 @@ impl<T> std::ops::DerefMut for SmallVec<T> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Extend<T> for SmallVec<T> {
|
||||
fn extend<I>(&mut self, iter: I)
|
||||
where
|
||||
I: IntoIterator<Item = T>,
|
||||
{
|
||||
for i in iter {
|
||||
self.push(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue