From: Jacob Lifshay Date: Thu, 13 May 2021 01:02:23 +0000 (-0700) Subject: fix build errors when `std` is disabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ec4a3e8a4bf7ad37a16f400ddb08c5d9f26d7d5;p=vector-math.git fix build errors when `std` is disabled --- diff --git a/src/algorithms/trig_pi.rs b/src/algorithms/trig_pi.rs index 93d2efc..1dca80a 100644 --- a/src/algorithms/trig_pi.rs +++ b/src/algorithms/trig_pi.rs @@ -1,6 +1,5 @@ use crate::{ - f16::F16, - prim::{PrimFloat, PrimSInt, PrimUInt}, + prim::{PrimFloat, PrimUInt}, traits::{Compare, Context, ConvertFrom, ConvertTo, Float, Make, Select}, }; diff --git a/src/prim.rs b/src/prim.rs index 184e5fc..19f4270 100644 --- a/src/prim.rs +++ b/src/prim.rs @@ -187,7 +187,10 @@ macro_rules! impl_float { self.to_bits() } fn abs(self) -> Self { - $float::abs(self) + #[cfg(feature = "std")] + return $float::abs(self); + #[cfg(not(feature = "std"))] + todo!(); } } };