Simplify InvalidType

This commit is contained in:
gwenn
2016-05-30 21:20:07 +02:00
parent fb19e718cf
commit 91dc30b04d
6 changed files with 12 additions and 14 deletions

View File

@@ -1067,7 +1067,7 @@ impl<'a, 'stmt> Row<'a, 'stmt> {
let idx = try!(idx.idx(self.stmt));
let value = unsafe { ValueRef::new(&self.stmt.stmt, idx) };
FromSql::column_result(value).map_err(|err| match err {
Error::InvalidType(t) => Error::InvalidColumnType(idx, t),
Error::InvalidType => Error::InvalidColumnType(idx, value.data_type()),
_ => err,
})
}