change var name
This commit is contained in:
		
							parent
							
								
									037df42271
								
							
						
					
					
						commit
						a50ec5d79b
					
				
							
								
								
									
										12
									
								
								src/main.rs
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/main.rs
									
									
									
									
									
								
							@ -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 })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user