Remove superfluous nesting
This commit is contained in:
parent
509ab578d6
commit
5ac680b64d
|
@ -58,9 +58,6 @@ pub fn composite_derive(input: TokenStream) -> TokenStream {
|
|||
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 field_is_arc_rwlock = true;
|
||||
|
||||
if field_is_arc_rwlock {
|
||||
match (observe_option, observe_option_vec, observe, observe_vec) {
|
||||
(true, _, _, _) => quote! {
|
||||
#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
|
||||
},
|
||||
}
|
||||
} else {
|
||||
panic!("Fields must be of type Arc<RwLock<T: Updateable>>");
|
||||
}
|
||||
};
|
||||
|
||||
match &input.data {
|
||||
|
|
Loading…
Reference in New Issue