From fe22e78423754b6e0f2b41d9f8f3a613ac778530 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Fri, 16 Oct 2020 16:20:19 +0100 Subject: [PATCH] concise syntax --- src/room.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/room.rs b/src/room.rs index 03d38d5..b8af00e 100644 --- a/src/room.rs +++ b/src/room.rs @@ -77,9 +77,8 @@ impl From for Room { let item_position: Vec<&str> = last_line.split(' ').collect(); let item_id = item_position[0]; let position = item_position[1]; - let position = Position::from_str(position); - if let Ok(position) = position { + if let Ok(position) = Position::from_str(position) { items.push(Instance { position, id: item_id.to_string() }); } } else if last_line.starts_with("EXT") {