rust/land_dump/src/main.rs
changeset 14152 5acfdf49742d
parent 14137 3119d665d3c6
child 14164 1749961647b9
equal deleted inserted replaced
14151:3c8a33ba06ba 14152:5acfdf49742d
    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");