Change err msg
This commit is contained in:
		
							parent
							
								
									cd0f4a0867
								
							
						
					
					
						commit
						0dd5080d63
					
				@ -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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user