master
rasul 5 years ago
parent 7e83c23855
commit 3a9cb2fa43

@ -29,7 +29,7 @@ impl<'a> TryFrom<&Row<'a>> for Exit {
"Unable to get column 'direction' from row" "Unable to get column 'direction' from row"
)), )),
"Unable to parse direction" "Unable to parse direction"
) ),
}) })
} }
} }

@ -82,11 +82,17 @@ impl<'a> TryFrom<&Row<'a>> for Room {
id: try_log!(row.get("id"), "Unable to get column 'id' from row"), id: try_log!(row.get("id"), "Unable to get column 'id' from row"),
zone: try_log!(row.get("zone"), "Unable to get column 'zone' from row"), zone: try_log!(row.get("zone"), "Unable to get column 'zone' from row"),
name: try_log!(row.get("name"), "Unable to get column 'name' from row"), name: try_log!(row.get("name"), "Unable to get column 'name' from row"),
description: try_log!(row.get::<&str, String>("description"), "Unable to get column 'description' from row") description: try_log!(
.lines() row.get::<&str, String>("description"),
.map(|s| String::from(s)) "Unable to get column 'description' from row"
.collect(), )
users_visible: try_log!(row.get("users_visible"), "Unable to get column 'users_visible' from row"), .lines()
.map(|s| String::from(s))
.collect(),
users_visible: try_log!(
row.get("users_visible"),
"Unable to get column 'users_visible' from row"
),
exits: HashMap::new(), exits: HashMap::new(),
}) })
} }

Loading…
Cancel
Save