@@ -1,5 +1,5 @@
1/// A program that serializes a Rust structure to YAML and pretty-prints the result
1/// A program that serializes a Rust structure to YAML and pretty-prints the result
2−use bat::PrettyPrinter;
2+use bat::{Input, PrettyPrinter};
3use serde::Serialize;
3use serde::Serialize;
5#[derive(Serialize)]
5#[derive(Serialize)]
@@ -29,7 +29,7 @@ fn main() {
29 .line_numbers(true)
29 .line_numbers(true)
30 .grid(true)
30 .grid(true)
31 .header(true)
31 .header(true)
32− .input_from_bytes_with_name(&bytes, "person.yaml")
32+ .input(Input::from_bytes(&bytes).name("person.yaml").kind("File"))
34 .unwrap();
34 .unwrap();