no std compiles

This commit is contained in:
Robin Müller 2023-07-12 13:54:45 +02:00
parent 1d2af1eda1
commit a7d9990305
Signed by: muellerr
GPG Key ID: 407F9B00F858F270
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

View File

@ -2,13 +2,12 @@
//!
//! The core data structure of this module is the [PusScheduler]. This structure can be used
//! to perform the scheduling of telecommands like specified in the ECSS standard.
use core::fmt::{Debug, Display, Formatter};
use core::fmt::Debug;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use spacepackets::ecss::scheduling::TimeWindowType;
use spacepackets::ecss::tc::{GenericPusTcSecondaryHeader, IsPusTelecommand};
use spacepackets::ecss::PusError;
use spacepackets::time::{CcsdsTimeProvider, TimestampError};
use spacepackets::time::CcsdsTimeProvider;
use spacepackets::CcsdsPacket;
#[cfg(feature = "std")]
use std::error::Error;
@ -142,14 +141,15 @@ pub mod alloc_mod {
use alloc::collections::BTreeMap;
use alloc::vec;
use alloc::vec::Vec;
use core::fmt::{Display, Formatter};
use core::time::Duration;
use spacepackets::ecss::scheduling::TimeWindowType;
use spacepackets::ecss::tc::{
GenericPusTcSecondaryHeader, IsPusTelecommand, PusTc, PusTcReader,
};
use spacepackets::ecss::PusPacket;
use spacepackets::ecss::{PusError, PusPacket};
use spacepackets::time::cds::DaysLen24Bits;
use spacepackets::time::{cds, CcsdsTimeProvider, TimeReader, UnixTimestamp};
use spacepackets::time::{cds, CcsdsTimeProvider, TimeReader, UnixTimestamp, TimestampError};
#[cfg(feature = "std")]
use std::time::SystemTimeError;