equal
deleted
inserted
replaced
84 .expect("Unable to read templates file") |
84 .expect("Unable to read templates file") |
85 .read_to_string(&mut result); |
85 .read_to_string(&mut result); |
86 |
86 |
87 let mut generator = MapGenerator::new(); |
87 let mut generator = MapGenerator::new(); |
88 |
88 |
89 let bom = b"\xEF\xBB\xBF"; |
89 let source = &result[..]; |
90 let source = if &result.as_bytes()[..bom.len()] == &bom[..] { |
|
91 &result[bom.len()..] |
|
92 } else { |
|
93 &result[..] |
|
94 }; |
|
95 |
90 |
96 generator.import_yaml_templates(source); |
91 generator.import_yaml_templates(source); |
97 |
92 |
98 let template_type = &opt.template_type |
93 let template_type = &opt.template_type |
99 .expect("No template type specified"); |
94 .expect("No template type specified"); |