diff --git a/Makefile b/Makefile index e68a94436751..85b791b6f97e 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ build-release-native: .venv ## Same as build-release, except with native CPU op .PHONY: check check: ## Run cargo check with all features - cargo clippy --workspace --all-targets --all-features + cargo check --workspace --all-targets --all-features .PHONY: clippy clippy: ## Run clippy with all features diff --git a/crates/polars-arrow/src/array/list/iterator.rs b/crates/polars-arrow/src/array/list/iterator.rs index faa13fde4b1a..5ae7f96a5c4c 100644 --- a/crates/polars-arrow/src/array/list/iterator.rs +++ b/crates/polars-arrow/src/array/list/iterator.rs @@ -49,27 +49,3 @@ impl<'a, O: Offset> ListArray { NonNullValuesIter::new(self, self.validity()) } } - -struct Iter>> { - current: i32, - offsets: std::vec::IntoIter, - values: I, -} - -impl> + Clone> Iterator for Iter { - type Item = Option>>; - - fn next(&mut self) -> Option { - let next = self.offsets.next(); - next.map(|next| { - let length = next - self.current; - let iter = self - .values - .clone() - .skip(self.current as usize) - .take(length as usize); - self.current = next; - Some(iter) - }) - } -} diff --git a/crates/polars-arrow/src/compute/arity.rs b/crates/polars-arrow/src/compute/arity.rs index e590e7b1974b..683f680269d5 100644 --- a/crates/polars-arrow/src/compute/arity.rs +++ b/crates/polars-arrow/src/compute/arity.rs @@ -105,6 +105,9 @@ where { let mut mut_bitmap = MutableBitmap::with_capacity(array.len()); + // TODO: Clippy lint is broken, remove attr once fixed. + // https://github.com/rust-lang/rust-clippy/issues/12580 + #[cfg_attr(feature = "nightly", allow(clippy::manual_unwrap_or_default))] let values = array .values() .iter() @@ -254,6 +257,9 @@ where let mut mut_bitmap = MutableBitmap::with_capacity(lhs.len()); + // TODO: Clippy lint is broken, remove attr once fixed. + // https://github.com/rust-lang/rust-clippy/issues/12580 + #[cfg_attr(feature = "nightly", allow(clippy::manual_unwrap_or_default))] let values = lhs .values() .iter() diff --git a/crates/polars-arrow/src/compute/decimal.rs b/crates/polars-arrow/src/compute/decimal.rs index 4afc35f0993d..d4199d260362 100644 --- a/crates/polars-arrow/src/compute/decimal.rs +++ b/crates/polars-arrow/src/compute/decimal.rs @@ -112,6 +112,12 @@ pub struct FormatBuffer { len: usize, } +impl Default for FormatBuffer { + fn default() -> Self { + Self::new() + } +} + impl FormatBuffer { #[inline] pub const fn new() -> Self { diff --git a/crates/polars-arrow/src/legacy/kernels/atan2.rs b/crates/polars-arrow/src/legacy/kernels/atan2.rs index 3a2f54159050..7884ab18d09f 100644 --- a/crates/polars-arrow/src/legacy/kernels/atan2.rs +++ b/crates/polars-arrow/src/legacy/kernels/atan2.rs @@ -4,12 +4,9 @@ use crate::array::PrimitiveArray; use crate::compute::arity::binary; use crate::types::NativeType; -pub fn atan2( - arr_1: &PrimitiveArray, - arr_2: &PrimitiveArray, -) -> PrimitiveArray +pub fn atan2(arr_1: &PrimitiveArray, arr_2: &PrimitiveArray) -> PrimitiveArray where - T: Float, + T: Float + NativeType, { binary(arr_1, arr_2, arr_1.data_type().clone(), |a, b| a.atan2(b)) } diff --git a/crates/polars-arrow/src/legacy/kernels/take_agg/var.rs b/crates/polars-arrow/src/legacy/kernels/take_agg/var.rs index b5000f0eca4d..8fd54d712e94 100644 --- a/crates/polars-arrow/src/legacy/kernels/take_agg/var.rs +++ b/crates/polars-arrow/src/legacy/kernels/take_agg/var.rs @@ -42,16 +42,14 @@ where /// Take kernel for single chunk and an iterator as index. /// # Safety /// caller must ensure iterators indexes are in bounds -pub unsafe fn take_var_no_null_primitive_iter_unchecked< - T: NativeType + ToPrimitive, - I: IntoIterator, ->( +pub unsafe fn take_var_no_null_primitive_iter_unchecked( arr: &PrimitiveArray, indices: I, ddof: u8, ) -> Option where - T: ToPrimitive, + T: NativeType + ToPrimitive, + I: IntoIterator, { debug_assert!(arr.null_count() == 0); let array_values = arr.values().as_slice(); @@ -67,16 +65,14 @@ where /// Take kernel for single chunk and an iterator as index. /// # Safety /// caller must ensure iterators indexes are in bounds -pub unsafe fn take_var_nulls_primitive_iter_unchecked< - T: NativeType + ToPrimitive, - I: IntoIterator, ->( +pub unsafe fn take_var_nulls_primitive_iter_unchecked( arr: &PrimitiveArray, indices: I, ddof: u8, ) -> Option where - T: ToPrimitive, + T: NativeType + ToPrimitive, + I: IntoIterator, { debug_assert!(arr.null_count() > 0); let array_values = arr.values().as_slice(); diff --git a/crates/polars-compute/src/float_sum.rs b/crates/polars-compute/src/float_sum.rs index 0f14c56c4f67..76bbd329e4fe 100644 --- a/crates/polars-compute/src/float_sum.rs +++ b/crates/polars-compute/src/float_sum.rs @@ -256,9 +256,9 @@ where } } -pub fn sum_arr_as_f32(arr: &PrimitiveArray) -> f32 +pub fn sum_arr_as_f32(arr: &PrimitiveArray) -> f32 where - T: FloatSum, + T: NativeType + FloatSum, { let validity = arr.validity().filter(|_| arr.null_count() > 0); if let Some(mask) = validity { @@ -268,9 +268,9 @@ where } } -pub fn sum_arr_as_f64(arr: &PrimitiveArray) -> f64 +pub fn sum_arr_as_f64(arr: &PrimitiveArray) -> f64 where - T: FloatSum, + T: NativeType + FloatSum, { let validity = arr.validity().filter(|_| arr.null_count() > 0); if let Some(mask) = validity { diff --git a/crates/polars-core/src/chunked_array/ops/aggregate/mod.rs b/crates/polars-core/src/chunked_array/ops/aggregate/mod.rs index 3165bf5b9275..aa671546cbe3 100644 --- a/crates/polars-core/src/chunked_array/ops/aggregate/mod.rs +++ b/crates/polars-core/src/chunked_array/ops/aggregate/mod.rs @@ -43,7 +43,7 @@ pub trait ChunkAggSeries { } } -fn sum(array: &PrimitiveArray) -> T +fn sum(array: &PrimitiveArray) -> T where T: NumericNative + NativeType, ::Simd: Add::Simd> + compute::aggregate::Sum, diff --git a/crates/polars-core/src/chunked_array/ops/mod.rs b/crates/polars-core/src/chunked_array/ops/mod.rs index a382d12ceb67..9c272c8629c9 100644 --- a/crates/polars-core/src/chunked_array/ops/mod.rs +++ b/crates/polars-core/src/chunked_array/ops/mod.rs @@ -29,6 +29,7 @@ mod interpolate; pub(crate) mod min_max_binary; pub(crate) mod nulls; mod reverse; +#[cfg(feature = "rolling_window")] pub(crate) mod rolling_window; pub mod search_sorted; mod set; diff --git a/crates/polars-core/src/chunked_array/upstream_traits.rs b/crates/polars-core/src/chunked_array/upstream_traits.rs index ce0fbcf4ad7b..843478c141ff 100644 --- a/crates/polars-core/src/chunked_array/upstream_traits.rs +++ b/crates/polars-core/src/chunked_array/upstream_traits.rs @@ -303,6 +303,9 @@ impl FromIterator> for ObjectChunked { let size = iter.size_hint().0; let mut null_mask_builder = MutableBitmap::with_capacity(size); + // TODO: Clippy lint is broken, remove attr once fixed. + // https://github.com/rust-lang/rust-clippy/issues/12580 + #[cfg_attr(feature = "nightly", allow(clippy::manual_unwrap_or_default))] let values: Vec = iter .map(|value| match value { Some(value) => { diff --git a/crates/polars-core/src/frame/group_by/aggregations/mod.rs b/crates/polars-core/src/frame/group_by/aggregations/mod.rs index 46dc3261d680..dc11bdbe402c 100644 --- a/crates/polars-core/src/frame/group_by/aggregations/mod.rs +++ b/crates/polars-core/src/frame/group_by/aggregations/mod.rs @@ -101,6 +101,9 @@ where unsafe { agg_window.update(start as usize, end as usize) } }; + // TODO: Clippy lint is broken, remove attr once fixed. + // https://github.com/rust-lang/rust-clippy/issues/12580 + #[cfg_attr(feature = "nightly", allow(clippy::manual_unwrap_or_default))] match agg { Some(val) => val, None => { diff --git a/crates/polars-core/src/series/series_trait.rs b/crates/polars-core/src/series/series_trait.rs index 8096da35d486..b97ffc864257 100644 --- a/crates/polars-core/src/series/series_trait.rs +++ b/crates/polars-core/src/series/series_trait.rs @@ -493,9 +493,9 @@ pub trait SeriesTrait: } impl<'a> (dyn SeriesTrait + 'a) { - pub fn unpack(&self) -> PolarsResult<&ChunkedArray> + pub fn unpack(&self) -> PolarsResult<&ChunkedArray> where - N: PolarsDataType, + N: 'static + PolarsDataType, { polars_ensure!(&N::get_dtype() == self.dtype(), unpack); Ok(self.as_ref()) diff --git a/crates/polars-io/src/csv/write_impl.rs b/crates/polars-io/src/csv/write_impl.rs index f9c2af3c5194..db79acb80650 100644 --- a/crates/polars-io/src/csv/write_impl.rs +++ b/crates/polars-io/src/csv/write_impl.rs @@ -266,16 +266,6 @@ impl Default for SerializeOptions { } } -/// Utility to write to `&mut Vec` buffer. -struct StringWrap<'a>(pub &'a mut Vec); - -impl<'a> std::fmt::Write for StringWrap<'a> { - fn write_str(&mut self, s: &str) -> std::fmt::Result { - self.0.extend_from_slice(s.as_bytes()); - Ok(()) - } -} - pub(crate) fn write( writer: &mut W, df: &DataFrame, diff --git a/crates/polars-ops/src/chunked_array/strings/substring.rs b/crates/polars-ops/src/chunked_array/strings/substring.rs index b6d5d9828c3d..b2e69b57317f 100644 --- a/crates/polars-ops/src/chunked_array/strings/substring.rs +++ b/crates/polars-ops/src/chunked_array/strings/substring.rs @@ -28,6 +28,9 @@ fn substring_ternary( // If we didn't find our char that means our offset was so negative it // is before the start of our string. This means our length must be // reduced, assuming it is finite. + // TODO: Clippy lint is broken, remove attr once fixed. + // https://github.com/rust-lang/rust-clippy/issues/12580 + #[cfg_attr(feature = "nightly", allow(clippy::manual_unwrap_or_default))] if let Some(off) = found { off } else { diff --git a/crates/polars-parquet/src/arrow/read/deserialize/mod.rs b/crates/polars-parquet/src/arrow/read/deserialize/mod.rs index 1ea087c06171..8cb22f127862 100644 --- a/crates/polars-parquet/src/arrow/read/deserialize/mod.rs +++ b/crates/polars-parquet/src/arrow/read/deserialize/mod.rs @@ -127,7 +127,7 @@ fn is_primitive(data_type: &ArrowDataType) -> bool { ) } -fn columns_to_iter_recursive<'a, I: 'a>( +fn columns_to_iter_recursive<'a, I>( mut columns: Vec, mut types: Vec<&PrimitiveType>, field: Field, @@ -136,7 +136,7 @@ fn columns_to_iter_recursive<'a, I: 'a>( chunk_size: Option, ) -> PolarsResult> where - I: PagesIter, + I: 'a + PagesIter, { if init.is_empty() && is_primitive(&field.data_type) { return Ok(Box::new( @@ -197,7 +197,7 @@ pub fn n_columns(data_type: &ArrowDataType) -> usize { /// For nested types, `columns` must be composed by all parquet columns with associated types `types`. /// /// The arrays are guaranteed to be at most of size `chunk_size` and data type `field.data_type`. -pub fn column_iter_to_arrays<'a, I: 'a>( +pub fn column_iter_to_arrays<'a, I>( columns: Vec, types: Vec<&PrimitiveType>, field: Field, @@ -205,7 +205,7 @@ pub fn column_iter_to_arrays<'a, I: 'a>( num_rows: usize, ) -> PolarsResult> where - I: PagesIter, + I: 'a + PagesIter, { Ok(Box::new( columns_to_iter_recursive(columns, types, field, vec![], num_rows, chunk_size)? diff --git a/crates/polars-parquet/src/arrow/read/deserialize/nested.rs b/crates/polars-parquet/src/arrow/read/deserialize/nested.rs index 25507816b8fe..d8d316281333 100644 --- a/crates/polars-parquet/src/arrow/read/deserialize/nested.rs +++ b/crates/polars-parquet/src/arrow/read/deserialize/nested.rs @@ -34,7 +34,7 @@ where })) } -pub fn columns_to_iter_recursive<'a, I: 'a>( +pub fn columns_to_iter_recursive<'a, I>( mut columns: Vec, mut types: Vec<&PrimitiveType>, field: Field, @@ -43,7 +43,7 @@ pub fn columns_to_iter_recursive<'a, I: 'a>( chunk_size: Option, ) -> PolarsResult> where - I: PagesIter, + I: 'a + PagesIter, { use arrow::datatypes::PhysicalType::*; use arrow::datatypes::PrimitiveType::*; diff --git a/crates/polars-parquet/src/arrow/write/nested/rep.rs b/crates/polars-parquet/src/arrow/write/nested/rep.rs index 52d73ded7b51..66e2afb68968 100644 --- a/crates/polars-parquet/src/arrow/write/nested/rep.rs +++ b/crates/polars-parquet/src/arrow/write/nested/rep.rs @@ -35,8 +35,7 @@ pub fn num_values(nested: &[Nested]) -> usize { iter(nested) .into_iter() - .enumerate() - .map(|(_, lengths)| { + .map(|lengths| { lengths .map(|length| if length == 0 { 1 } else { 0 }) .sum::() diff --git a/crates/polars-parquet/src/parquet/write/page.rs b/crates/polars-parquet/src/parquet/write/page.rs index ad6bc32efc68..229f1443cac9 100644 --- a/crates/polars-parquet/src/parquet/write/page.rs +++ b/crates/polars-parquet/src/parquet/write/page.rs @@ -40,6 +40,7 @@ fn maybe_bytes(uncompressed: usize, compressed: usize) -> Result<(i32, i32)> { /// Contains page write metrics. pub struct PageWriteSpec { pub header: ParquetPageHeader, + #[allow(dead_code)] pub num_values: usize, pub num_rows: Option, pub header_size: u64, diff --git a/crates/polars-plan/src/dsl/functions/arity.rs b/crates/polars-plan/src/dsl/functions/arity.rs index a8735462181d..9e4c2ac73354 100644 --- a/crates/polars-plan/src/dsl/functions/arity.rs +++ b/crates/polars-plan/src/dsl/functions/arity.rs @@ -14,9 +14,9 @@ macro_rules! prepare_binary_function { /// Apply a closure on the two columns that are evaluated from [`Expr`] a and [`Expr`] b. /// /// The closure takes two arguments, each a [`Series`]. `output_type` must be the output dtype of the resulting [`Series`]. -pub fn map_binary(a: Expr, b: Expr, f: F, output_type: GetOutput) -> Expr +pub fn map_binary(a: Expr, b: Expr, f: F, output_type: GetOutput) -> Expr where - F: Fn(Series, Series) -> PolarsResult> + Send + Sync, + F: 'static + Fn(Series, Series) -> PolarsResult> + Send + Sync, { let function = prepare_binary_function!(f); a.map_many(function, &[b], output_type) @@ -25,9 +25,9 @@ where /// Like [`map_binary`], but used in a group_by-aggregation context. /// /// See [`Expr::apply`] for the difference between [`map`](Expr::map) and [`apply`](Expr::apply). -pub fn apply_binary(a: Expr, b: Expr, f: F, output_type: GetOutput) -> Expr +pub fn apply_binary(a: Expr, b: Expr, f: F, output_type: GetOutput) -> Expr where - F: Fn(Series, Series) -> PolarsResult> + Send + Sync, + F: 'static + Fn(Series, Series) -> PolarsResult> + Send + Sync, { let function = prepare_binary_function!(f); a.apply_many(function, &[b], output_type) diff --git a/crates/polars-plan/src/dsl/functions/horizontal.rs b/crates/polars-plan/src/dsl/functions/horizontal.rs index 07c01ec53be5..c713eb813068 100644 --- a/crates/polars-plan/src/dsl/functions/horizontal.rs +++ b/crates/polars-plan/src/dsl/functions/horizontal.rs @@ -20,9 +20,10 @@ fn cum_fold_dtype() -> GetOutput { } /// Accumulate over multiple columns horizontally / row wise. -pub fn fold_exprs>(acc: Expr, f: F, exprs: E) -> Expr +pub fn fold_exprs(acc: Expr, f: F, exprs: E) -> Expr where - F: Fn(Series, Series) -> PolarsResult> + Send + Sync + Clone, + F: 'static + Fn(Series, Series) -> PolarsResult> + Send + Sync + Clone, + E: AsRef<[Expr]>, { let mut exprs = exprs.as_ref().to_vec(); exprs.push(acc); @@ -58,9 +59,10 @@ where /// An accumulator is initialized to the series given by the first expression in `exprs`, and then each subsequent value /// of the accumulator is computed from `f(acc, next_expr_series)`. If `exprs` is empty, an error is returned when /// `collect` is called. -pub fn reduce_exprs>(f: F, exprs: E) -> Expr +pub fn reduce_exprs(f: F, exprs: E) -> Expr where - F: Fn(Series, Series) -> PolarsResult> + Send + Sync + Clone, + F: 'static + Fn(Series, Series) -> PolarsResult> + Send + Sync + Clone, + E: AsRef<[Expr]>, { let exprs = exprs.as_ref().to_vec(); @@ -98,9 +100,10 @@ where /// Accumulate over multiple columns horizontally / row wise. #[cfg(feature = "dtype-struct")] -pub fn cum_reduce_exprs>(f: F, exprs: E) -> Expr +pub fn cum_reduce_exprs(f: F, exprs: E) -> Expr where - F: Fn(Series, Series) -> PolarsResult> + Send + Sync + Clone, + F: 'static + Fn(Series, Series) -> PolarsResult> + Send + Sync + Clone, + E: AsRef<[Expr]>, { let exprs = exprs.as_ref().to_vec(); @@ -143,14 +146,10 @@ where /// Accumulate over multiple columns horizontally / row wise. #[cfg(feature = "dtype-struct")] -pub fn cum_fold_exprs>( - acc: Expr, - f: F, - exprs: E, - include_init: bool, -) -> Expr +pub fn cum_fold_exprs(acc: Expr, f: F, exprs: E, include_init: bool) -> Expr where - F: Fn(Series, Series) -> PolarsResult> + Send + Sync + Clone, + F: 'static + Fn(Series, Series) -> PolarsResult> + Send + Sync + Clone, + E: AsRef<[Expr]>, { let mut exprs = exprs.as_ref().to_vec(); exprs.push(acc); diff --git a/crates/polars-plan/src/logical_plan/aexpr/mod.rs b/crates/polars-plan/src/logical_plan/aexpr/mod.rs index 2faf576642e7..3afe228315bb 100644 --- a/crates/polars-plan/src/logical_plan/aexpr/mod.rs +++ b/crates/polars-plan/src/logical_plan/aexpr/mod.rs @@ -1,8 +1,10 @@ +#[cfg(feature = "cse")] mod hash; mod schema; use std::hash::{Hash, Hasher}; +#[cfg(feature = "cse")] pub(super) use hash::traverse_and_hash_aexpr; use polars_core::prelude::*; use polars_core::utils::{get_time_units, try_get_supertype}; diff --git a/crates/polars-plan/src/logical_plan/expr_ir.rs b/crates/polars-plan/src/logical_plan/expr_ir.rs index df7ec7835f6a..7a1b47d2cb57 100644 --- a/crates/polars-plan/src/logical_plan/expr_ir.rs +++ b/crates/polars-plan/src/logical_plan/expr_ir.rs @@ -1,4 +1,6 @@ -use std::hash::{Hash, Hasher}; +use std::hash::Hash; +#[cfg(feature = "cse")] +use std::hash::Hasher; use super::*; use crate::constants::LITERAL_NAME; @@ -123,6 +125,7 @@ impl ExprIR { matches!(self.output_name, OutputName::Alias(_)) } + #[cfg(feature = "cse")] pub(crate) fn traverse_and_hash(&self, expr_arena: &Arena, state: &mut H) { traverse_and_hash_aexpr(self.node, expr_arena, state); if let Some(alias) = self.get_alias() { diff --git a/crates/polars-plan/src/logical_plan/visitor/lp.rs b/crates/polars-plan/src/logical_plan/visitor/lp.rs index 2a959e489027..c54652ac9aa7 100644 --- a/crates/polars-plan/src/logical_plan/visitor/lp.rs +++ b/crates/polars-plan/src/logical_plan/visitor/lp.rs @@ -27,6 +27,7 @@ impl ALogicalPlanNode { Self { node, arena } } + #[cfg(feature = "cse")] pub(crate) fn get_arena_raw(&self) -> *mut Arena { self.arena } diff --git a/crates/polars-plan/src/logical_plan/visitor/mod.rs b/crates/polars-plan/src/logical_plan/visitor/mod.rs index 149855970981..1ff6deba8c84 100644 --- a/crates/polars-plan/src/logical_plan/visitor/mod.rs +++ b/crates/polars-plan/src/logical_plan/visitor/mod.rs @@ -2,6 +2,7 @@ use arrow::legacy::error::PolarsResult; mod expr; +#[cfg(feature = "cse")] mod hash; mod lp; mod visitors; diff --git a/crates/polars-plan/src/prelude.rs b/crates/polars-plan/src/prelude.rs index 0b3f37cdfb22..d92862367f0b 100644 --- a/crates/polars-plan/src/prelude.rs +++ b/crates/polars-plan/src/prelude.rs @@ -5,7 +5,6 @@ pub(crate) use polars_time::in_nanoseconds_window; feature = "temporal", feature = "dtype-duration", feature = "dtype-date", - feature = "dtype-date", feature = "dtype-time" ))] pub(crate) use polars_time::prelude::*; diff --git a/crates/polars-time/src/windows/group_by.rs b/crates/polars-time/src/windows/group_by.rs index fe6fb680ebce..0da725707eb7 100644 --- a/crates/polars-time/src/windows/group_by.rs +++ b/crates/polars-time/src/windows/group_by.rs @@ -229,7 +229,7 @@ pub(crate) fn group_by_values_iter_lookbehind( tz: Option, start_offset: usize, upper_bound: Option, -) -> PolarsResult> + TrustedLen + '_> { +) -> PolarsResult> + '_> { debug_assert!(offset.duration_ns() == period.duration_ns()); debug_assert!(offset.negative); let add = match tu { @@ -450,7 +450,7 @@ pub(crate) fn group_by_values_iter( closed_window: ClosedWindow, tu: TimeUnit, tz: Option, -) -> PolarsResult> + TrustedLen + '_> { +) -> PolarsResult> + '_> { let mut offset = period; offset.negative = true; // t is at the right endpoint of the window diff --git a/crates/polars/tests/it/arrow/array/mod.rs b/crates/polars/tests/it/arrow/array/mod.rs index 89fbe3f19ad5..db9e3e414c3f 100644 --- a/crates/polars/tests/it/arrow/array/mod.rs +++ b/crates/polars/tests/it/arrow/array/mod.rs @@ -135,6 +135,7 @@ fn test_with_validity() { } // check that we ca derive stuff +#[allow(dead_code)] #[derive(PartialEq, Clone, Debug)] struct A { array: Box, diff --git a/crates/polars/tests/it/arrow/scalar/mod.rs b/crates/polars/tests/it/arrow/scalar/mod.rs index 0c1ef990b829..2f490f51e4fb 100644 --- a/crates/polars/tests/it/arrow/scalar/mod.rs +++ b/crates/polars/tests/it/arrow/scalar/mod.rs @@ -10,6 +10,7 @@ mod struct_; mod utf8; // check that `PartialEq` can be derived +#[allow(dead_code)] #[derive(PartialEq)] struct A { array: Box, diff --git a/py-polars/src/lib.rs b/py-polars/src/lib.rs index 5cc9622f7790..e1c978f595d7 100644 --- a/py-polars/src/lib.rs +++ b/py-polars/src/lib.rs @@ -28,6 +28,7 @@ mod gil_once_cell; mod lazyframe; mod lazygroupby; mod map; +#[cfg(debug_assertions)] mod memory; #[cfg(feature = "object")] mod object; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 5f75e2c9af81..9b6fc432e939 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-02-23" +channel = "nightly-2024-03-28"