Skip to content

Commit 4331da1

Browse files
committed
impl FromIterator for Aligned
1 parent 10a449d commit 4331da1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,19 @@ where
457457
}
458458
}
459459

460+
impl<A, T> FromIterator<T> for Aligned<A, T>
461+
where
462+
A: Alignment,
463+
T: FromIterator<T>,
464+
{
465+
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
466+
Self {
467+
_alignment: [],
468+
value: T::from_iter(iter),
469+
}
470+
}
471+
}
472+
460473
#[test]
461474
fn sanity() {
462475
use core::mem;

0 commit comments

Comments
 (0)