html terminal
Diffstat (limited to 'src/bot/voting.rs')
| -rw-r--r-- | src/bot/voting.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bot/voting.rs b/src/bot/voting.rs index 0c55682..2de5c96 100644 --- a/src/bot/voting.rs +++ b/src/bot/voting.rs @@ -101,8 +101,7 @@ macro_rules! votes { impl VoteData { pub fn summarize(&mut self, ctx: &Context<'_>, optcount: usize) -> Vec<usize> { - let mut ret = vec![]; - ret.resize(optcount, 0); + let mut ret = vec![0; optcount]; let mut v; for v in votes!(*self, ctx, v).values() { ret[*v] += 1; |