We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eede2af commit e0ae35bCopy full SHA for e0ae35b
src/package/mod.rs
@@ -588,12 +588,6 @@ fn create_backup_path(path: &Path) -> PathBuf {
588
PathBuf::from(backup_path)
589
}
590
591
-/// Compile a template file at the given path using Tera templating engine with the provided context. and return the rendered content as a String.
592
-pub fn compile_template(path: &Path, context: &Table) -> anyhow::Result<String> {
593
- let template_content = std::fs::read_to_string(path)?;
594
- compile_string(&template_content, context)
595
-}
596
-
597
pub fn compile_string(template_str: &str, context: &Table) -> anyhow::Result<String> {
598
let ctx = tera::Context::from_serialize(context)?;
599
Ok(tera::Tera::one_off(template_str, &ctx, false)?)
0 commit comments