diff --git a/rust/beer-song/src/lib.rs b/rust/beer-song/src/lib.rs index 155fdbc..1dbe7dc 100644 --- a/rust/beer-song/src/lib.rs +++ b/rust/beer-song/src/lib.rs @@ -22,6 +22,6 @@ pub fn verse(n: u32) -> String { pub fn sing(start: u32, end: u32) -> String { // Once it is stable, use `Iterator::intersperse` here to skip the temporary // `Vec`: https://github.com/rust-lang/rust/issues/79524 - let verses: Vec<_> = (end..=start).rev().map(|n| verse(n)).collect(); + let verses: Vec<_> = (end..=start).rev().map(verse).collect(); verses.join("\n\n") }