mirror of
https://github.com/isar/rusqlite.git
synced 2025-11-02 14:58:56 +08:00
impl ToSql for i8,i16,u8,u16,u32
This commit is contained in:
@@ -30,11 +30,22 @@ impl From<bool> for Value {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<i32> for Value {
|
||||
fn from(i: i32) -> Value {
|
||||
Value::Integer(i as i64)
|
||||
}
|
||||
}
|
||||
macro_rules! from_i64(
|
||||
($t:ty) => (
|
||||
impl From<$t> for Value {
|
||||
fn from(i: $t) -> Value {
|
||||
Value::Integer(i as i64)
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
from_i64!(i8);
|
||||
from_i64!(i16);
|
||||
from_i64!(i32);
|
||||
from_i64!(u8);
|
||||
from_i64!(u16);
|
||||
from_i64!(u32);
|
||||
|
||||
impl From<i64> for Value {
|
||||
fn from(i: i64) -> Value {
|
||||
|
||||
Reference in New Issue
Block a user