From f6301b8ea8d63f6fd31fa7e4bd566ba1db5e045b Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 7 Feb 2025 10:59:11 +0100 Subject: [PATCH] Rust: remove unneeded and now broken bazel workaround --- rust/ast-generator/src/main.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rust/ast-generator/src/main.rs b/rust/ast-generator/src/main.rs index 1a4557bd5e9..c778389cfdb 100644 --- a/rust/ast-generator/src/main.rs +++ b/rust/ast-generator/src/main.rs @@ -150,10 +150,7 @@ fn write_schema( .map(|node| node_src_to_schema_class(node, &super_types)), ); // the concat dance is currently required by bazel - let template = mustache::compile_str(include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/schema.mustache" - )))?; + let template = mustache::compile_str(include_str!("templates/schema.mustache"))?; let res = template.render_to_string(&schema)?; Ok(fix_blank_lines(&res)) } @@ -558,10 +555,7 @@ fn write_extractor(grammar: &AstSrc) -> mustache::Result { nodes: grammar.nodes.iter().map(node_to_extractor_info).collect(), }; // the concat dance is currently required by bazel - let template = mustache::compile_str(include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/extractor.mustache" - )))?; + let template = mustache::compile_str(include_str!("templates/extractor.mustache"))?; let res = template.render_to_string(&extractor_info)?; Ok(fix_blank_lines(&res)) }