From 4466ae0104ed44a8cf41d187d9359483fe190701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 5 Jun 2024 15:01:13 -0400 Subject: [PATCH] Fix building with no-std --- src/bitmap/mod.rs | 1 + src/bitmap/ops_with_serialized.rs | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/bitmap/mod.rs b/src/bitmap/mod.rs index 1d481afa..ed5567d5 100644 --- a/src/bitmap/mod.rs +++ b/src/bitmap/mod.rs @@ -12,6 +12,7 @@ mod cmp; mod inherent; mod iter; mod ops; +#[cfg(feature = "std")] mod ops_with_serialized; #[cfg(feature = "serde")] mod serde; diff --git a/src/bitmap/ops_with_serialized.rs b/src/bitmap/ops_with_serialized.rs index e0eb06a4..9d33c560 100644 --- a/src/bitmap/ops_with_serialized.rs +++ b/src/bitmap/ops_with_serialized.rs @@ -1,10 +1,10 @@ use bytemuck::cast_slice_mut; use byteorder::{LittleEndian, ReadBytesExt}; use core::convert::Infallible; -use core::mem; -use core::ops::RangeInclusive; use std::error::Error; use std::io::{self, SeekFrom}; +use std::mem; +use std::ops::RangeInclusive; use crate::bitmap::container::Container; use crate::bitmap::serialization::{ @@ -13,9 +13,6 @@ use crate::bitmap::serialization::{ }; use crate::RoaringBitmap; -#[cfg(not(feature = "std"))] -use alloc::vec::Vec; - use super::container::ARRAY_LIMIT; use super::store::{ArrayStore, BitmapStore, Store, BITMAP_LENGTH};