From 54c3a5d9bf439ffa380c235387a437aabafd4be5 Mon Sep 17 00:00:00 2001 From: Aarash Heydari Date: Fri, 24 Sep 2021 19:04:37 -0400 Subject: [PATCH] Fix 'FromSql' trait implementation for other unsigned ints --- src/types/from_sql.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/from_sql.rs b/src/types/from_sql.rs index a4bee21c..575dd4ce 100644 --- a/src/types/from_sql.rs +++ b/src/types/from_sql.rs @@ -81,6 +81,12 @@ macro_rules! from_sql_integral( ValueRef::Int(i) => Ok(<$t as cast::From>::cast(i).unwrap()), ValueRef::BigInt(i) => Ok(<$t as cast::From>::cast(i).unwrap()), ValueRef::HugeInt(i) => Ok(<$t as cast::From>::cast(i).unwrap()), + + ValueRef::UTinyInt(i) => Ok(<$t as cast::From>::cast(i).unwrap()), + ValueRef::USmallInt(i) => Ok(<$t as cast::From>::cast(i).unwrap()), + ValueRef::UInt(i) => Ok(<$t as cast::From>::cast(i).unwrap()), + ValueRef::UBigInt(i) => Ok(<$t as cast::From>::cast(i).unwrap()), + ValueRef::Float(i) => Ok(<$t as cast::From>::cast(i).unwrap()), ValueRef::Double(i) => Ok(<$t as cast::From>::cast(i).unwrap()),