diff --git a/README.md b/README.md index f01286d3..64a24b61 100644 --- a/README.md +++ b/README.md @@ -85,15 +85,18 @@ fn main() { let path = Path::new(&env::var("OUT_DIR").unwrap()).join("codegen.rs"); let mut file = BufWriter::new(File::create(&path).unwrap()); - write!(&mut file, "static KEYWORDS: phf::Map<&'static str, Keyword> = ").unwrap(); - phf_codegen::Map::new() - .entry("loop", "Keyword::Loop") - .entry("continue", "Keyword::Continue") - .entry("break", "Keyword::Break") - .entry("fn", "Keyword::Fn") - .entry("extern", "Keyword::Extern") - .build(&mut file) - .unwrap(); + write!( + &mut file, + "static KEYWORDS: phf::Map<&'static str, Keyword> = {}", + phf_codegen::Map::new() + .entry("loop", "Keyword::Loop") + .entry("continue", "Keyword::Continue") + .entry("break", "Keyword::Break") + .entry("fn", "Keyword::Fn") + .entry("extern", "Keyword::Extern") + .build() + ) + .unwrap(); write!(&mut file, ";\n").unwrap(); } ```