Skip to content

Commit

Permalink
improve expect reason strings
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Sep 10, 2024
1 parent a32cd87 commit 190f43b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ impl ComponentData {
column_data
.as_any()
.downcast_ref::<ArrowListArray<i32>>()
.expect("sanity checked")
.expect("`data_type` checked, failure is a bug in re_dataframe")
.clone(),
)),
DataType::Dictionary(IntegerType::Int32, _, _) => {
let dict = column_data
.as_any()
.downcast_ref::<ArrowDictionaryArray<i32>>()
.expect("sanity checked")
.expect("`data_type` checked, failure is a bug in re_dataframe")
.clone();
let values = dict
.values()
.as_any()
.downcast_ref::<ArrowListArray<i32>>()
.expect("sanity checked")
.expect("`data_type` checked, failure is a bug in re_dataframe")
.clone();
Ok(Self::DictionaryArray { dict, values })
}
Expand Down Expand Up @@ -146,7 +146,7 @@ impl DisplayColumn {
let row_ids = column_data
.as_any()
.downcast_ref::<ArrowStructArray>()
.expect("sanity checked");
.expect("expected format for RowId, failure is a bug in re_dataframe");
let [times, counters] = row_ids.values() else {
panic!("RowIds are corrupt -- this should be impossible (sanity checked)");
};
Expand All @@ -155,14 +155,14 @@ impl DisplayColumn {
let row_id_times = times
.as_any()
.downcast_ref::<ArrowPrimitiveArray<u64>>()
.expect("sanity checked")
.expect("expected format for RowId, failure is a bug in re_dataframe")
.clone();

#[allow(clippy::unwrap_used)]
let row_id_counters = counters
.as_any()
.downcast_ref::<ArrowPrimitiveArray<u64>>()
.expect("sanity checked")
.expect("expected format for RowId, failure is a bug in re_dataframe")
.clone();

Ok(Self::RowId {
Expand Down

0 comments on commit 190f43b

Please sign in to comment.