change var name

This commit is contained in:
Martin HART 2020-10-29 14:52:43 +01:00
parent 037df42271
commit a50ec5d79b

View File

@ -79,22 +79,22 @@ fn parse_config(conf: String, pool: &mut Vec<robot::Robot>) -> Result<world::Wor
if !empty_line.is_empty() {
return Err("This line should be empty !");
}
let a = match lines.next() {
let raw_setup = match lines.next() {
None => return Err("This line should be the config !"),
Some(raw) => raw,
};
if a.is_empty() {
if raw_setup.is_empty() {
return Err("This line should not be empty !");
}
let b = match lines.next() {
let raw_inst = match lines.next() {
None => return Err("This line should be the instruction !"),
Some(raw) => raw,
};
if b.is_empty() {
if raw_inst.is_empty() {
return Err("Thi line should not be empty !");
}
println!("{}", a);
println!("{}", b);
println!("{}", raw_setup);
println!("{}", raw_inst);
}
Ok(world::World { x, y })
}