MCPcopy Create free account
hub / github.com/Lokathor/tinyvec / from_iter

Method from_iter

src/arrayvec.rs:1487–1493  ·  view source on GitHub ↗
(iter: T)

Source from the content-addressed store, hash-verified

1485impl<A: Array> FromIterator<A::Item> for ArrayVec<A> {
1486 #[inline]
1487 fn from_iter<T: IntoIterator<Item = A::Item>>(iter: T) -> Self {
1488 let mut av = Self::default();
1489 for i in iter {
1490 av.push(i)
1491 }
1492 av
1493 }
1494}
1495
1496/// Iterator for consuming an `ArrayVec` and returning owned elements.

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected