summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 982cc52..ec62374 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -258,7 +258,7 @@ impl Reformat {
let mut entries: Vec<Entry> = book.entries().to_vec();
entries.sort_by_cached_key(|e| e.name.clone());
if self.stdout {
- serde_yaml::to_writer(std::io::stdout(), book.entries())?;
+ serde_yaml::to_writer(std::io::stdout(), &entries)?;
} else {
let filename = book.filename();
let dirname = match filename.parent() {
@@ -267,7 +267,7 @@ impl Reformat {
Some(x) => x,
};
let temp = NamedTempFile::new_in(dirname)?;
- serde_yaml::to_writer(&temp, book.entries())?;
+ serde_yaml::to_writer(&temp, &entries)?;
std::fs::rename(temp.path(), filename)?;
}
Ok(())