concise syntax
This commit is contained in:
parent
fd08bff10e
commit
fe22e78423
|
@ -77,9 +77,8 @@ impl From<String> for Room {
|
||||||
let item_position: Vec<&str> = last_line.split(' ').collect();
|
let item_position: Vec<&str> = last_line.split(' ').collect();
|
||||||
let item_id = item_position[0];
|
let item_id = item_position[0];
|
||||||
let position = item_position[1];
|
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() });
|
items.push(Instance { position, id: item_id.to_string() });
|
||||||
}
|
}
|
||||||
} else if last_line.starts_with("EXT") {
|
} else if last_line.starts_with("EXT") {
|
||||||
|
|
Loading…
Reference in New Issue