From c3e1e1c8b3cb673c2fe4eea02aafcd20b67de429 Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Mon, 19 Oct 2020 14:45:48 +0200 Subject: [PATCH] untest fixed-macro example until rustc 1.45.0 requirement --- Cargo.toml | 1 - src/lib.rs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f9ccb9f..18f8cd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,6 @@ num-traits = { version = "0.2.12", default-features = false, optional = true } serde = { version = "1.0.60", default-features = false, optional = true } [dev-dependencies] -fixed-macro = "1" rand = { version = "0.7", default-features = false } rand_xoshiro = "0.4" criterion = "0.3" diff --git a/src/lib.rs b/src/lib.rs index 9dfac0c..f84bd31 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -146,12 +146,14 @@ The [*fixed-macro* crate] provides a convenient macro to write down fixed-point constants literally in the code. ```rust +# #[cfg!(feature = "add-fixed-macro-dev-dependency-on-rustc-version-bump")] { use fixed::types::I16F16; use fixed_macro::fixed; const NUM1: I16F16 = fixed!(12.75: I16F16); let num2 = NUM1 + fixed!(13.125: I16F16); assert_eq!(num2, 25.875); +# } ``` ## Using the *fixed* crate