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 y: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_instruction(v: &Vec<char>) -> bool {
|
pub fn is_instructions(v: &Vec<char>) -> bool {
|
||||||
for c in v {
|
for c in v {
|
||||||
match c {
|
match c {
|
||||||
'F' => continue,
|
'F' => continue,
|
||||||
@ -20,14 +20,14 @@ pub fn is_instruction(v: &Vec<char>) -> bool {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
#[test]
|
#[test]
|
||||||
fn is_instruction_test() {
|
fn is_instructions_test() {
|
||||||
let v = vec!['F', 'R', 'L', 'F'];
|
let v = vec!['F', 'R', 'L', 'F'];
|
||||||
assert!(is_instruction(&v));
|
assert!(is_instructions(&v));
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic]
|
#[should_panic]
|
||||||
fn is_instruction_test_fail() {
|
fn is_instructions_test_fail() {
|
||||||
let v = vec!['F', 'R', 'L', 'Z'];
|
let v = vec!['F', 'R', 'L', 'Z'];
|
||||||
assert!(is_instruction(&v));
|
assert!(is_instructions(&v));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user