Change err msg

This commit is contained in:
Martin HART 2020-10-29 14:43:38 +01:00
parent cd0f4a0867
commit 0dd5080d63
1 changed files with 4 additions and 4 deletions

View File

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