forked from libre-chip/cpu
ArrayVec::map: actually connect to all output elements
This commit is contained in:
parent
9cecc6aaa0
commit
7fc205e583
1 changed files with 4 additions and 0 deletions
|
|
@ -226,6 +226,10 @@ impl<T: Type, N: Size> ArrayVec<T, N> {
|
|||
#[hdl]
|
||||
let mapped_array_vec = wire(this.ty().mapped_ty(new_element_ty));
|
||||
connect(mapped_array_vec.len, this.len);
|
||||
connect(
|
||||
mapped_array_vec.elements,
|
||||
mapped_array_vec.ty().elements.uninit(),
|
||||
);
|
||||
Self::for_each(this, |index, element| {
|
||||
connect(mapped_array_vec[index], f(index, element));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue