change var name

This commit is contained in:
Martin HART 2020-10-29 14:52:43 +01:00
parent 037df42271
commit a50ec5d79b
1 changed files with 6 additions and 6 deletions

View File

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