concise syntax

This commit is contained in:
Max Bradbury 2020-10-16 16:20:19 +01:00
parent fd08bff10e
commit fe22e78423
1 changed files with 1 additions and 2 deletions

View File

@ -77,9 +77,8 @@ impl From<String> 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") {