From eb427043807f37cddc3bf2068b6336959b85fa4f Mon Sep 17 00:00:00 2001 From: projectmoon Date: Thu, 17 Dec 2020 21:06:43 +0000 Subject: [PATCH] Switch to into_iter instead of a non-consuming iterator. --- src/cofd/dice.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cofd/dice.rs b/src/cofd/dice.rs index 4b7608d..4c4cc78 100644 --- a/src/cofd/dice.rs +++ b/src/cofd/dice.rs @@ -163,14 +163,14 @@ const MAX_DISPLAYED_ROLLS: usize = 15; fn fmt_rolls(pool: &DicePoolRoll) -> String { let rolls = pool.rolls(); if rolls.len() > MAX_DISPLAYED_ROLLS { - let shown_amount = rolls.iter().take(MAX_DISPLAYED_ROLLS).join(", "); + let shown_amount = rolls.into_iter().take(MAX_DISPLAYED_ROLLS).join(", "); format!( "{}, and {} more", shown_amount, rolls.len() - MAX_DISPLAYED_ROLLS ) } else { - rolls.iter().join(", ") + rolls.into_iter().join(", ") } }