From 5b46e484e28226f3c66cdb4e67a54934695e9ebd Mon Sep 17 00:00:00 2001 From: dangotbanned <125183946+dangotbanned@users.noreply.github.com> Date: Wed, 8 May 2024 21:36:36 +0100 Subject: [PATCH] fix(rust): Add missing allow macros for windows Was unable to run `make pre-commit`: `error: could not compile `py-polars` (lib) due to 3 previous errors` This simply adds the three missing allows. --- py-polars/src/lib.rs | 2 ++ py-polars/src/memory.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/py-polars/src/lib.rs b/py-polars/src/lib.rs index 6abd7a3056e2..84599e820865 100644 --- a/py-polars/src/lib.rs +++ b/py-polars/src/lib.rs @@ -45,6 +45,7 @@ mod utils; #[cfg(all(target_family = "unix", not(use_mimalloc), not(default_allocator)))] use jemallocator::Jemalloc; #[cfg(any(not(target_family = "unix"), use_mimalloc))] +#[allow(unused_imports)] use mimalloc::MiMalloc; use pyo3::panic::PanicException; use pyo3::prelude::*; @@ -65,6 +66,7 @@ use crate::functions::PyStringCacheHolder; use crate::lazyframe::{PyInProcessQuery, PyLazyFrame}; use crate::lazygroupby::PyLazyGroupBy; #[cfg(debug_assertions)] +#[allow(unused_imports)] use crate::memory::TracemallocAllocator; use crate::series::PySeries; #[cfg(feature = "sql")] diff --git a/py-polars/src/memory.rs b/py-polars/src/memory.rs index b07bb5b25ea2..e7abf2b7d51c 100644 --- a/py-polars/src/memory.rs +++ b/py-polars/src/memory.rs @@ -44,6 +44,7 @@ pub struct TracemallocAllocator { impl TracemallocAllocator { /// Wrap the allocator such that allocations are registered with /// tracemalloc. + #[allow(dead_code)] pub const fn new(wrapped_alloc: A) -> Self { Self { wrapped_alloc } }