fix typo
This commit is contained in:
		
							parent
							
								
									5d4d3a29c7
								
							
						
					
					
						commit
						2fe77a0e2d
					
				
							
								
								
									
										10
									
								
								src/world.rs
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/world.rs
									
									
									
									
									
								
							@ -4,7 +4,7 @@ pub struct World {
 | 
			
		||||
    pub y: i32,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub fn is_instruction(v: &Vec<char>) -> bool {
 | 
			
		||||
pub fn is_instructions(v: &Vec<char>) -> bool {
 | 
			
		||||
    for c in v {
 | 
			
		||||
        match c {
 | 
			
		||||
            'F' => continue,
 | 
			
		||||
@ -20,14 +20,14 @@ pub fn is_instruction(v: &Vec<char>) -> bool {
 | 
			
		||||
mod tests {
 | 
			
		||||
    use super::*;
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn is_instruction_test() {
 | 
			
		||||
    fn is_instructions_test() {
 | 
			
		||||
        let v = vec!['F', 'R', 'L', 'F'];
 | 
			
		||||
        assert!(is_instruction(&v));
 | 
			
		||||
        assert!(is_instructions(&v));
 | 
			
		||||
    }
 | 
			
		||||
    #[test]
 | 
			
		||||
    #[should_panic]
 | 
			
		||||
    fn is_instruction_test_fail() {
 | 
			
		||||
    fn is_instructions_test_fail() {
 | 
			
		||||
        let v = vec!['F', 'R', 'L', 'Z'];
 | 
			
		||||
        assert!(is_instruction(&v));
 | 
			
		||||
        assert!(is_instructions(&v));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user