From a78ae0d154a8dfe5dce51586c45ffa4e35de849b Mon Sep 17 00:00:00 2001 From: Daniel Wong Date: Sat, 13 Jul 2019 22:49:59 +1000 Subject: [PATCH] Allow disabling all alpha optimizations --- src/reduction/alpha.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/reduction/alpha.rs b/src/reduction/alpha.rs index b255e9f7..a13a9056 100644 --- a/src/reduction/alpha.rs +++ b/src/reduction/alpha.rs @@ -16,7 +16,10 @@ pub(crate) fn try_alpha_reductions( alphas: &HashSet, eval: &Evaluator, ) { - assert!(!alphas.is_empty()); + if alphas.is_empty() { + return; + } + let alphas = alphas.iter().collect::>(); let alphas_iter = alphas.par_iter().with_max_len(1); alphas_iter