aboutsummaryrefslogtreecommitdiff
path: root/dev_tools
diff options
context:
space:
mode:
Diffstat (limited to 'dev_tools')
-rw-r--r--dev_tools/src/bin/refresh-examples.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/dev_tools/src/bin/refresh-examples.rs b/dev_tools/src/bin/refresh-examples.rs
index c341bc4..be5da82 100644
--- a/dev_tools/src/bin/refresh-examples.rs
+++ b/dev_tools/src/bin/refresh-examples.rs
@@ -118,7 +118,14 @@ fn main() {
});
}
- std::fs::write(repo_root.join(OUTPUT_PATH), template.to_string()).unwrap();
+ let template_str = template.to_string();
+ let template_str = template_str
+ .lines()
+ .map(|line| line.trim_end())
+ .collect::<Vec<_>>()
+ .join("\n")
+ + "\n";
+ std::fs::write(repo_root.join(OUTPUT_PATH), template_str).unwrap();
}
fn find_git_repo() -> Option<std::path::PathBuf> {