From 2fe77a0e2d97048f12baad9bf49879f7709a94b4 Mon Sep 17 00:00:00 2001 From: Martin HART Date: Fri, 30 Oct 2020 16:06:22 +0100 Subject: [PATCH] fix typo --- src/world.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/world.rs b/src/world.rs index 43afa6e..927a82a 100644 --- a/src/world.rs +++ b/src/world.rs @@ -4,7 +4,7 @@ pub struct World { pub y: i32, } -pub fn is_instruction(v: &Vec) -> bool { +pub fn is_instructions(v: &Vec) -> bool { for c in v { match c { 'F' => continue, @@ -20,14 +20,14 @@ pub fn is_instruction(v: &Vec) -> 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)); } }