summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRaghav-Bell <raghavsingla327@gmail.com>2023-10-01 23:14:10 +0530
committerDavid Peter <sharkdp@users.noreply.github.com>2023-10-04 12:42:01 +0200
commit8e35a567121a7186d77e12e249490210c6eb75a9 (patch)
tree4ffb20118e01fa9090aaedfc8f97c6956e372ad4 /examples
parent9f795dd9472b24848fe1e2c087cf8163be280fa1 (diff)
Updated version of `serde_yaml` to 0.9
Diffstat (limited to 'examples')
-rw-r--r--examples/yaml.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/yaml.rs b/examples/yaml.rs
index 78df2464..fe95dac0 100644
--- a/examples/yaml.rs
+++ b/examples/yaml.rs
@@ -23,7 +23,8 @@ fn main() {
}],
};
- let bytes = serde_yaml::to_vec(&person).unwrap();
+ let mut bytes = Vec::with_capacity(128);
+ serde_yaml::to_writer(&mut bytes, &person).unwrap();
PrettyPrinter::new()
.language("yaml")
.line_numbers(true)