mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 10:21:53 +00:00
simplify process_queue
This commit is contained in:
@@ -181,6 +181,11 @@ fn build_model_struct(
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for #model_name {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<patch_db::json_ptr::JsonPointer> for #model_name {
|
||||
fn from(ptr: patch_db::json_ptr::JsonPointer) -> Self {
|
||||
#model_name(#inner_model::from(ptr))
|
||||
@@ -276,6 +281,11 @@ fn build_model_struct(
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for #model_name {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl #model_name {
|
||||
#(
|
||||
pub fn #child_fn_name(self) -> #child_model {
|
||||
@@ -327,6 +337,11 @@ fn build_model_enum(base: &DeriveInput, _: &DataEnum, model_name: Option<Ident>)
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for #model_name {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<patch_db::json_ptr::JsonPointer> for #model_name {
|
||||
fn from(ptr: patch_db::json_ptr::JsonPointer) -> Self {
|
||||
#model_name(From::from(ptr))
|
||||
|
||||
Reference in New Issue
Block a user