Skip to content

Commit

Permalink
Update colown.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
8000thCube authored and sarah-quinones committed Sep 7, 2024
1 parent b99da35 commit b83cca5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/col/colown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,12 @@ impl<E: Entity> Col<E> {
this: &mut Col<E>,
other: ColRef<'_, ViewE>,
) {
let mut mat = Col::<E>::new();
mat.resize_with(
this.resize_with(0, |_| E::zeroed());
this.resize_with(
other.nrows(),
#[inline(always)]
|row| unsafe { other.read_unchecked(row).canonicalize() },
);
*this = mat;
}
implementation(self, other.as_col_ref());
}
Expand Down Expand Up @@ -1071,11 +1070,12 @@ impl<E: Entity> Clone for Col<E> {
})
}
}fn clone_from(&mut self,other:&Self){
let rows=other.nrows();
self.resize_with(0,|_|E::zeroed());
unsafe{
self.resize_with(rows,|r|other.read_unchecked(r))
}
self.resize_with(0, |_| E::zeroed());
self.resize_with(
other.nrows(),
#[inline(always)]
|row| unsafe { other.read_unchecked(row) },
);
}
}

Expand Down

0 comments on commit b83cca5

Please sign in to comment.