From defe0a093408d4c3c4cd618ff99939a8d1ffb21f Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Mon, 29 Jul 2024 19:03:22 +0300 Subject: [PATCH 1/2] Fix small bug in reverting #107 --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index b6e42c4..3c29f66 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -220,6 +220,7 @@ impl Not for Choice { /// code may break in a non-destructive way in the future, “constant-time” code /// is a continually moving target, and this is better than doing nothing. #[inline(never)] +#[cfg(not(feature = "core_hint_black_box"))] fn black_box(input: T) -> T { unsafe { // Optimization barrier From 69acfb7aa7486212e5170290610efddf83cec266 Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Mon, 29 Jul 2024 19:04:48 +0300 Subject: [PATCH 2/2] Enable const-generics feature on default --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ae7361c..1c4726b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ rand = { version = "0.8" } const-generics = [] # DEPRECATED: As of 2.5.1, this feature does nothing. core_hint_black_box = [] -default = ["std", "i128"] +default = ["std", "i128", "const-generics"] std = [] i128 = [] # DEPRECATED: As of 2.4.1, this feature does nothing.