From e4001c99c758db02c748a26d1000d1ca16e146e9 Mon Sep 17 00:00:00 2001 From: Martin HART Date: Wed, 28 Oct 2020 16:42:36 +0100 Subject: [PATCH] add token --- src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index e994322..d1ae7d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,11 +28,10 @@ fn parse_config(conf: String, pool: &mut Vec) -> Result return Err("Could not read the first line of the config file !"), Some(raw) => raw, }; - /* - let raw_token = raw_line.split_whitespace(); - let token1 = raw_token.next(); - let token2 = raw_token.next(); - */ + let mut tokens = raw_line.split_whitespace(); + let token1 = tokens.next(); + let token2 = tokens.next(); + println!("{}, {}", token1.unwrap(), token2.unwrap()); Ok(world::World { x: 5, y: 5 }) }