summaryrefslogtreecommitdiffstats
path: root/svgbob_cli/examples/memes3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'svgbob_cli/examples/memes3.rs')
-rw-r--r--svgbob_cli/examples/memes3.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/svgbob_cli/examples/memes3.rs b/svgbob_cli/examples/memes3.rs
index 6d43879..140b9f4 100644
--- a/svgbob_cli/examples/memes3.rs
+++ b/svgbob_cli/examples/memes3.rs
@@ -4,8 +4,8 @@ use std::fs::File;
use std::collections::BTreeMap;
use handlebars::Handlebars;
-extern crate svgbob;
extern crate svg;
+extern crate svgbob;
use handlebars::Context;
@@ -15,20 +15,19 @@ fn main() {
let bob_str = include_str!("memes3.bob");
let svg = svgbob::to_svg(bob_str);
svg::save(svg_file, &svg).unwrap();
- println!("Saved to {}",svg_file);
+ println!("Saved to {}", svg_file);
let handlebars = Handlebars::new();
let mut m: BTreeMap<String, String> = BTreeMap::new();
- m.insert("bob".to_string(),bob_str.to_owned());
+ m.insert("bob".to_string(), bob_str.to_owned());
m.insert("svg_file".to_string(), svg_file.to_string());
let context = Context::wraps(&m);
-
let mut source_template = File::open(&"web/index.hbs").unwrap();
let mut output_file = File::create(html_file).unwrap();
if let Ok(_) = handlebars.template_renderw2(&mut source_template, &context, &mut output_file) {
println!("Rendered to {}", html_file);
} else {
- println!("Error");
+ println!("Error");
};
}