Open Ankerbot opened 2 years ago
It seems like the usize
-impl for the QueryIndex
trait does no checking, unlike the &str
-impl. The lack of documentation for the QueryIndex
trait makes it hard to judge if that would be the responsibility of said trait or not, but the current implementation seems inconsistent.
It would be easy enough to fix in the usize-impl for QueryIndex
by checking against the length of row.columns
.
https://github.com/prisma/tiberius/blob/0f3bffdbabc42233850682ff1767840edc9ccba4/src/row.rs#L392
Hey, thanks for tiberius!
In try_get in row.rs:390 there is the possibility to panic in the unwrap, which shouldn't happen.
I got it by doing
I would expect it to return some kind of error instead of panic-ing, a generic one would be alright.
I feel like there is something else going wrong here, because normally the check for row bounds should have already returned an error.