Remove redundant closure

This commit is contained in:
Avery Winters 2024-10-24 13:45:07 -05:00
parent bcbce6c12e
commit ba12cb80f5
Signed by: avery
SSH key fingerprint: SHA256:eesvLB5MMqHLZrAMFt6kEhqJWnASMLcET6Sgmw0FqZI

View file

@ -22,6 +22,6 @@ pub fn verse(n: u32) -> String {
pub fn sing(start: u32, end: u32) -> String { pub fn sing(start: u32, end: u32) -> String {
// Once it is stable, use `Iterator::intersperse` here to skip the temporary // Once it is stable, use `Iterator::intersperse` here to skip the temporary
// `Vec`: https://github.com/rust-lang/rust/issues/79524 // `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") verses.join("\n\n")
} }