Remove superfluous nesting

This commit is contained in:
bitfl0wer 2023-08-15 17:08:27 +02:00
parent d30542c783
commit 7a21154726
No known key found for this signature in database
GPG Key ID: 0ACD574FCF5226CF
1 changed files with 16 additions and 22 deletions

View File

@ -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 {