From 90f7f40240977851bdd6c65032c1c4dc8a47d624 Mon Sep 17 00:00:00 2001 From: shueja-personal Date: Thu, 28 Nov 2024 00:09:04 -0800 Subject: [PATCH] Add a newline to the end of .traj and .chor writing This is primarily for formatters like wpiformat to pass the file. --- src-core/src/file_management/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src-core/src/file_management/mod.rs b/src-core/src/file_management/mod.rs index d736ff02a..1264cbd55 100644 --- a/src-core/src/file_management/mod.rs +++ b/src-core/src/file_management/mod.rs @@ -37,6 +37,8 @@ async fn write_serializable(contents: T, file: &Path) -> Ch .ok_or_else(|| ChoreoError::FileWrite(file.to_path_buf()))?; fs::create_dir_all(parent).await?; fs::write(file, json).await?; + // end with a blank line to make e.g. wpiformat happy + fs::write(file, "\n").await?; Ok(()) }