Remove superfluous nesting
This commit is contained in:
parent
d30542c783
commit
7a21154726
|
@ -58,9 +58,6 @@ pub fn composite_derive(input: TokenStream) -> TokenStream {
|
||||||
let observe = attrs.iter().any(|attr| attr.path().is_ident("observe"));
|
let observe = attrs.iter().any(|attr| attr.path().is_ident("observe"));
|
||||||
let observe_vec = attrs.iter().any(|attr| attr.path().is_ident("observe_vec"));
|
let observe_vec = attrs.iter().any(|attr| attr.path().is_ident("observe_vec"));
|
||||||
|
|
||||||
let field_is_arc_rwlock = true;
|
|
||||||
|
|
||||||
if field_is_arc_rwlock {
|
|
||||||
match (observe_option, observe_option_vec, observe, observe_vec) {
|
match (observe_option, observe_option_vec, observe, observe_vec) {
|
||||||
(true, _, _, _) => quote! {
|
(true, _, _, _) => quote! {
|
||||||
#field_name: Self::option_observe_fn(self.#field_name, gateway).await
|
#field_name: Self::option_observe_fn(self.#field_name, gateway).await
|
||||||
|
@ -78,9 +75,6 @@ pub fn composite_derive(input: TokenStream) -> TokenStream {
|
||||||
#field_name: self.#field_name
|
#field_name: self.#field_name
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
panic!("Fields must be of type Arc<RwLock<T: Updateable>>");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
match &input.data {
|
match &input.data {
|
||||||
|
|
Loading…
Reference in New Issue