|
|
|
@ -22,8 +22,14 @@ impl<'a> TryFrom<&Row<'a>> for Exit {
|
|
|
|
|
|
|
|
|
|
fn try_from(row: &Row) -> Result<Self, Self::Error> {
|
|
|
|
|
Ok(Self {
|
|
|
|
|
target: row.get("target")?,
|
|
|
|
|
direction: Direction::try_from_long(row.get::<&str, String>("direction")?)?,
|
|
|
|
|
target: try_log!(row.get("target"), "Unable to get column 'target' from row"),
|
|
|
|
|
direction: try_log!(
|
|
|
|
|
Direction::try_from_long(try_log!(
|
|
|
|
|
row.get::<&str, String>("direction"),
|
|
|
|
|
"Unable to get column 'direction' from row"
|
|
|
|
|
)),
|
|
|
|
|
"Unable to parse direction"
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|