From cdbd832290d63442e3495cd1620316d9460724b6 Mon Sep 17 00:00:00 2001 From: Thomas Gideon Date: Wed, 10 Apr 2024 10:15:11 -0400 Subject: [PATCH] Correct formatting fix for new file --- src/main.rs | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/main.rs b/src/main.rs index 62a9afa..6067706 100644 --- a/src/main.rs +++ b/src/main.rs @@ -140,22 +140,14 @@ async fn main() -> Result<()> { file.write(format!("# {}\n\n", day.end.format("%Y-%m-%d")).as_bytes())?; // TODO move to separate function - file.write(create_back_link(&day.end, "[One week ago](diary:{})\n", 7).as_bytes())?; - file.write( - create_back_link(&day.end, "[One month ago](diary:{})\n", 30).as_bytes(), - )?; - file.write( - create_back_link(&day.end, "[Six months ago](diary:{})\n", 6 * 30).as_bytes(), - )?; - file.write( - create_back_link(&day.end, "[One year ago](diary:{})\n", 365).as_bytes(), - )?; - file.write( - create_back_link(&day.end, "[Two years ago](diary:{})\n", 365 * 2).as_bytes(), - )?; - file.write( - create_back_link(&day.end, "[Three years ago](diary:{})\n", 365 * 3).as_bytes(), - )?; + file.write(create_back_link(&day.end, "One week ago", 7).as_bytes())?; + file.write(create_back_link(&day.end, "One month ago", 30).as_bytes())?; + file.write(create_back_link(&day.end, "Six months ago", 6 * 30).as_bytes())?; + file.write(create_back_link(&day.end, "One year ago", 365).as_bytes())?; + file.write(create_back_link(&day.end, "Two years ago", 365 * 2).as_bytes())?; + file.write(create_back_link(&day.end, "Three years ago", 365 * 3).as_bytes())?; + + file.write(b"\n")?; file } };