aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 8168ad8..1d6bdd4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -70,7 +70,7 @@ fn build(
70 if current_depth < max_depth { 70 if current_depth < max_depth {
71 let block = blocks 71 let block = blocks
72 .get(&Key::Macro(caps[2].to_string())) 72 .get(&Key::Macro(caps[2].to_string()))
73 .expect("Block not present") 73 .unwrap_or_else(|| panic!("Block \"{}\" not present", caps[2].to_string()))
74 .clone(); 74 .clone();
75 indent(block, caps[1].len()) 75 indent(block, caps[1].len())
76 } else { 76 } else {
@@ -88,8 +88,7 @@ fn build(
88 .clone() 88 .clone()
89 .unwrap_or(PathBuf::from(BASE)) 89 .unwrap_or(PathBuf::from(BASE))
90 .join(path); 90 .join(path);
91 write_to_file(file, &code) 91 write_to_file(file, &code).unwrap();
92 .expect("Unable to write to file");
93 }) 92 })
94} 93}
95 94