fix break
This commit is contained in:
parent
bdf91b7777
commit
8518de91cb
@ -173,7 +173,7 @@ fn parse_config(conf: String, pool: &mut Vec<robot::Robot>) -> Result<world::Wor
|
|||||||
|
|
||||||
// Convert instructions line.
|
// Convert instructions line.
|
||||||
let inst: Vec<char> = raw_inst.chars().collect();
|
let inst: Vec<char> = raw_inst.chars().collect();
|
||||||
if !world::is_instructions(&inst) {
|
if !robot::is_instructions(&inst) {
|
||||||
return Err(String::from("Invalid instructions !"));
|
return Err(String::from("Invalid instructions !"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_check_map() {
|
fn test_check_map() {
|
||||||
let mut r = robot::Robot::new(
|
let r = robot::Robot::new(
|
||||||
0,
|
0,
|
||||||
robot::Orientation::N,
|
robot::Orientation::N,
|
||||||
robot::Position { x: 2, y: 3 },
|
robot::Position { x: 2, y: 3 },
|
||||||
@ -242,7 +242,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
#[should_panic]
|
#[should_panic]
|
||||||
fn test_check_map_fail() {
|
fn test_check_map_fail() {
|
||||||
let mut r = robot::Robot::new(
|
let r = robot::Robot::new(
|
||||||
0,
|
0,
|
||||||
robot::Orientation::N,
|
robot::Orientation::N,
|
||||||
robot::Position { x: 2, y: 4 },
|
robot::Position { x: 2, y: 4 },
|
||||||
@ -256,7 +256,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
#[should_panic]
|
#[should_panic]
|
||||||
fn test_check_collisions() {
|
fn test_check_collisions() {
|
||||||
let mut r = robot::Robot::new(
|
let r = robot::Robot::new(
|
||||||
0,
|
0,
|
||||||
robot::Orientation::N,
|
robot::Orientation::N,
|
||||||
robot::Position { x: 2, y: 3 },
|
robot::Position { x: 2, y: 3 },
|
||||||
|
Loading…
Reference in New Issue
Block a user