From 4690c32607687fa22c1913ef4df04310a1ce61d6 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Fri, 23 Jul 2021 00:22:55 +1000 Subject: [PATCH] Fix unnecessary recursion in ERS97 algorithm --- src/stv/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stv/mod.rs b/src/stv/mod.rs index acc7f79..66442f1 100644 --- a/src/stv/mod.rs +++ b/src/stv/mod.rs @@ -841,8 +841,8 @@ fn elect_meeting_quota<'a, N: Number>(state: &mut CountState<'a, N>, opts: &STVO calculate_quota(state, opts); // Repeat in case vote required for election has changed - match elect_meeting_quota(state, opts) { - Ok(_) => {} + match elect_hopefuls(state, opts) { + Ok(_) => { break; } Err(e) => { return Err(e); } } }