Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
angelip2303 committed Nov 28, 2023
1 parent 0cf785d commit 981d032
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/engine/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ impl<T: ReadableStorageTraits> EngineStrategy<Vec<u8>> for Array<T> {
let end = vec![self.shape()[0], index as u64];
let shape = &ArraySubset::new_with_start_end_inc(start, end)?;
let ans = self.retrieve_array_subset_elements(shape)?;
Ok(ans)
Ok(ans.to_vec())
}
}
4 changes: 2 additions & 2 deletions src/storage/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub trait LayoutOps<R, T: TriviallyTransmutable, C> {
iter.for_each(|chunk| {
arr.store_chunk_elements(
&[count.load(Ordering::Relaxed), 0],
self.chunk_elements(chunk, objects_size).as_slice(),
self.chunk_elements(chunk, objects_size),
)
.unwrap();
count.fetch_add(1, Ordering::Relaxed);
Expand All @@ -58,7 +58,7 @@ pub trait LayoutOps<R, T: TriviallyTransmutable, C> {
vec![remainder.len() as u64, objects_per_chunk(&arr)],
)
.unwrap(), // TODO: remove unwrap
self.chunk_elements(remainder, objects_size).as_slice(),
self.chunk_elements(remainder, objects_size),
)
.unwrap();
}
Expand Down

0 comments on commit 981d032

Please sign in to comment.