From a0194c92aacc9f1191e77aeec0cd51d992b65fd4 Mon Sep 17 00:00:00 2001 From: Mick van Gelderen Date: Wed, 20 Mar 2024 15:25:01 +0100 Subject: [PATCH] Refactor debug assertion --- .../src/physical_plan/executors/scan/ipc.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/polars-lazy/src/physical_plan/executors/scan/ipc.rs b/crates/polars-lazy/src/physical_plan/executors/scan/ipc.rs index ad93d9f3f2e9..f3759a54c727 100644 --- a/crates/polars-lazy/src/physical_plan/executors/scan/ipc.rs +++ b/crates/polars-lazy/src/physical_plan/executors/scan/ipc.rs @@ -227,13 +227,10 @@ fn finish_index_and_dfs( ) -> PolarsResult { index_and_dfs.sort_unstable_by(|(a, _), (b, _)| a.cmp(b)); - #[cfg(debug_assertions)] - { - assert!( - index_and_dfs.iter().enumerate().all(|(a, &(b, _))| a == b), - "expected dataframe indices in order from 0 to len" - ); - } + debug_assert!( + index_and_dfs.iter().enumerate().all(|(a, &(b, _))| a == b), + "expected dataframe indices in order from 0 to len" + ); debug_assert_eq!(index_and_dfs.len(), row_counter.counts.len()); let mut offset = 0;