summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2020-04-22 22:41:25 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2020-04-22 23:55:28 +0200
commit261a7ea1549cbcd01986f891bbaf1b5936e7641d (patch)
treed0aae0d40c6ccb9bec3098f473f2e241c61719df /examples
parent53a973e9dd9ecf102d7bcc345846f2632585159a (diff)
Add *_with_name methods
Diffstat (limited to 'examples')
-rw-r--r--examples/yaml.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/yaml.rs b/examples/yaml.rs
index 0bfc94db..b504e424 100644
--- a/examples/yaml.rs
+++ b/examples/yaml.rs
@@ -27,7 +27,9 @@ fn main() {
PrettyPrinter::new()
.language("yaml")
.line_numbers(true)
- .input_from_bytes(&bytes)
+ .grid(true)
+ .header(true)
+ .input_from_bytes_with_name(&bytes, "person.yaml")
.print()
.unwrap();
}