mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 10:21:53 +00:00
minor refactor of transactions
This commit is contained in:
@@ -162,6 +162,11 @@ fn build_model_struct(
|
||||
#model_name(#inner_model::from(ptr))
|
||||
}
|
||||
}
|
||||
impl From<#model_name> for patch_db::json_ptr::JsonPointer {
|
||||
fn from(model: #model_name) -> Self {
|
||||
model.0.into()
|
||||
}
|
||||
}
|
||||
impl AsRef<patch_db::json_ptr::JsonPointer> for #model_name {
|
||||
fn as_ref(&self) -> &patch_db::json_ptr::JsonPointer {
|
||||
self.0.as_ref()
|
||||
@@ -242,6 +247,11 @@ fn build_model_struct(
|
||||
#model_name(From::from(ptr))
|
||||
}
|
||||
}
|
||||
impl From<#model_name> for patch_db::json_ptr::JsonPointer {
|
||||
fn from(model: #model_name) -> Self {
|
||||
model.0.into()
|
||||
}
|
||||
}
|
||||
impl AsRef<patch_db::json_ptr::JsonPointer> for #model_name {
|
||||
fn as_ref(&self) -> &patch_db::json_ptr::JsonPointer {
|
||||
self.0.as_ref()
|
||||
@@ -281,6 +291,11 @@ fn build_model_enum(base: &DeriveInput, _: &DataEnum, model_name: Option<Ident>)
|
||||
#model_name(From::from(ptr))
|
||||
}
|
||||
}
|
||||
impl From<#model_name> for patch_db::json_ptr::JsonPointer {
|
||||
fn from(model: #model_name) -> Self {
|
||||
model.0.into()
|
||||
}
|
||||
}
|
||||
impl AsRef<patch_db::json_ptr::JsonPointer> for #model_name {
|
||||
fn as_ref(&self) -> &patch_db::json_ptr::JsonPointer {
|
||||
self.0.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user