oh just cargo fmt it all

This commit is contained in:
2026-10-06 20:58:16 +01:00
parent 37a6496906
commit d154b1e376
17 changed files with 119 additions and 116 deletions
@@ -1,13 +1,23 @@
fn main() {
let gifts: [&str;12] = ["A partridge in a pear tree", "Two turtle doves and", "Three french hens ",
"Four calling birds", "Five golden rings", "Six geese a-laying", "Seven swans a-swimming",
"Eight maids a-milking", "Nine ladies dancing", "Ten lords a-leaping",
"Eleven pipers piping", "Twelve drummers drumming" ];
let gifts: [&str; 12] = [
"A partridge in a pear tree",
"Two turtle doves and",
"Three french hens ",
"Four calling birds",
"Five golden rings",
"Six geese a-laying",
"Seven swans a-swimming",
"Eight maids a-milking",
"Nine ladies dancing",
"Ten lords a-leaping",
"Eleven pipers piping",
"Twelve drummers drumming",
];
let mut s = String::from(gifts[0]);
for day in 1..13 {
let ending = if day == 1 {
let ending = if day == 1 {
"st"
} else if day == 2 {
"nd"
@@ -16,10 +26,10 @@ fn main() {
};
println!("\nOn the {day}{ending} day of Christmas, my true love sent to me");
println!("{s}");
if day != 12 {
s.insert_str(0,"\n");
s.insert_str(0,gifts[day]);
s.insert_str(0, "\n");
s.insert_str(0, gifts[day]);
}
}
}