Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Added assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
hohav committed Jul 14, 2022
1 parent 1ff6a13 commit eb2ff39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/array/fixed_size_list/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ impl<M: MutableArray> MutableFixedSizeListArray<M> {
/// Creates a new [`MutableFixedSizeListArray`] from a [`MutableArray`], [`DataType`] and size.
pub fn new_from(values: M, data_type: DataType, size: usize) -> Self {
assert_eq!(values.len(), 0);
match data_type {
DataType::FixedSizeList(..) => {},
_ => panic!("data type must be FixedSizeList (got {:?})", data_type),
};
Self {
size,
data_type,
Expand Down

0 comments on commit eb2ff39

Please sign in to comment.