Skip to content

Commit

Permalink
feat: added compilation error if features period_type_u64/u32 were …
Browse files Browse the repository at this point in the history
…enabled on 32-bit or even 16-bit machines
  • Loading branch information
amv-dev committed Nov 11, 2023
1 parent d900239 commit 8793cd6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ pub mod helpers;
pub mod indicators;
pub mod methods;

#[cfg(all(feature = "period_type_u64", target_pointer_width = "32"))]
compile_error!("Feature `period_type_u64` can't be used on 32-bit machines");

#[cfg(all(
any(feature = "period_type_u32", feature = "period_type_u64"),
target_pointer_width = "16"
))]
compile_error!("Features `period_type_u64` and `period_type_u32` can't be used on 16-bit machines");

/// Contains main traits you need to start using this library
pub mod prelude {
pub use super::core::{
Expand Down

0 comments on commit 8793cd6

Please sign in to comment.