no std compiles

This commit is contained in:
2023-07-12 13:54:45 +02:00
parent 1d2af1eda1
commit a7d9990305
2 changed files with 11 additions and 9 deletions

View File

@ -180,11 +180,9 @@ impl Error for StoreError {
}
}
type PoolSize = usize;
const STORE_FREE: PoolSize = PoolSize::MAX;
const POOL_MAX_SIZE: PoolSize = STORE_FREE - 1;
pub mod alloc_mod {
#[cfg(feature = "alloc")]
mod alloc_mod {
use crate::pool::{
NumBlocks, PoolSize, StoreAddr, StoreError, StoreIdError, POOL_MAX_SIZE, STORE_FREE,
};
@ -200,6 +198,10 @@ pub mod alloc_mod {
#[cfg(feature = "std")]
pub type SharedPool = Arc<RwLock<ShareablePoolProvider>>;
type PoolSize = usize;
const STORE_FREE: PoolSize = PoolSize::MAX;
const POOL_MAX_SIZE: PoolSize = STORE_FREE - 1;
/// Configuration structure of the [local pool][LocalPool]
///
/// # Parameters