Skip to content

Commit

Permalink
fix rrgen issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosath committed Jan 4, 2025
1 parent 6725a70 commit ee86a7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions protypo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ tempfile = "3.10"
tracing = "0.1"
url = { version = "2", features = ["serde"] }
zip = "2.2.1"
#rrgen = { git = "https://github.com/dinosath/rrgen", branch = "mini-jinja", default-features = false, features = ["minijinja"] }
rrgen = { path = "../../rrgen/rrgen", default-features = false, features = ["minijinja"] }
rrgen = { git = "https://github.com/dinosath/rrgen", branch = "mini-jinja", default-features = false, features = ["minijinja"] }
3 changes: 2 additions & 1 deletion protypo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ impl Generator {
let mut context = ctx.clone().as_object().unwrap().clone();
context.insert("entities".to_string(), self.collect_entities());

let templates = collect_templates(self);
let binding = collect_templates(self);
let templates: Vec<_> = binding.iter().map(|(s1, s2)| (s1.as_str(), s2.as_str())).collect();
let rrgen = RRgen::with_templates(templates).map_err(|err| {
std::io::Error::new(std::io::ErrorKind::Other, format!("Could not initialize rrgen, due to error: {:?}", err))
})?;
Expand Down

0 comments on commit ee86a7e

Please sign in to comment.