Skip to content

Commit

Permalink
Small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kgadek committed Jun 18, 2022
1 parent e2964ab commit b6debe2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ fn main() -> Result<(), Box<dyn Error>> {
.split_first()
.ok_or("mst: Requires at least 1 argument: path to template file")?;

let template = mustache::compile_path(&source_path)
let template: mustache::Template = mustache::compile_path(&source_path)
.unwrap_or_else(|err| panic!("mustache: Can't compile template: {:?}", err));

let data = {
let data: mustache::Data = {
let mut data = MapBuilder::new();
for (k, v) in pairs(kv_args.iter()) {
data = data.insert_str(k, v);
Expand Down Expand Up @@ -55,7 +55,7 @@ fn main() -> Result<(), Box<dyn Error>> {
.unwrap_or_else(|err| panic!("cmd: Can't run {:?}: {:?}", cmd, err));
if output.status.success() {
String::from_utf8(output.stdout).unwrap_or_else(|err| {
panic!("cmd: can't decode stdout of {:?}: {:?}", &cmd, err)
panic!("cmd: can't decode stdout of {:?}: {:?}", cmd, err)
})
} else {
let exitcode = output
Expand Down

0 comments on commit b6debe2

Please sign in to comment.