Skip to content

Commit f6301b8

Browse files
committed
Rust: remove unneeded and now broken bazel workaround
1 parent 75b5493 commit f6301b8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

rust/ast-generator/src/main.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,7 @@ fn write_schema(
150150
.map(|node| node_src_to_schema_class(node, &super_types)),
151151
);
152152
// the concat dance is currently required by bazel
153-
let template = mustache::compile_str(include_str!(concat!(
154-
env!("CARGO_MANIFEST_DIR"),
155-
"/src/templates/schema.mustache"
156-
)))?;
153+
let template = mustache::compile_str(include_str!("templates/schema.mustache"))?;
157154
let res = template.render_to_string(&schema)?;
158155
Ok(fix_blank_lines(&res))
159156
}
@@ -558,10 +555,7 @@ fn write_extractor(grammar: &AstSrc) -> mustache::Result<String> {
558555
nodes: grammar.nodes.iter().map(node_to_extractor_info).collect(),
559556
};
560557
// the concat dance is currently required by bazel
561-
let template = mustache::compile_str(include_str!(concat!(
562-
env!("CARGO_MANIFEST_DIR"),
563-
"/src/templates/extractor.mustache"
564-
)))?;
558+
let template = mustache::compile_str(include_str!("templates/extractor.mustache"))?;
565559
let res = template.render_to_string(&extractor_info)?;
566560
Ok(fix_blank_lines(&res))
567561
}

0 commit comments

Comments
 (0)