adds From<uuid::Uuid> for sql::Value and sql::Uuid (#1398)
This commit is contained in:
parent
50a2c25688
commit
01858bf4ca
2 changed files with 12 additions and 0 deletions
|
@ -22,6 +22,12 @@ impl From<&str> for Uuid {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<uuid::Uuid> for Uuid{
|
||||
fn from(v: uuid::Uuid) -> Self {
|
||||
Uuid(v)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for Uuid {
|
||||
fn from(s: String) -> Self {
|
||||
Self::from(s.as_str())
|
||||
|
|
|
@ -155,6 +155,12 @@ impl From<Uuid> for Value {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<uuid::Uuid> for Value{
|
||||
fn from(v: uuid::Uuid) -> Self {
|
||||
Value::Uuid(Uuid(v))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Param> for Value {
|
||||
fn from(v: Param) -> Self {
|
||||
Value::Param(v)
|
||||
|
|
Loading…
Reference in a new issue