Skip to content

Commit

Permalink
Merge pull request #1223 from rzvncj/fix-get_all
Browse files Browse the repository at this point in the history
πŸ› zm: Fix generated get_all() function
  • Loading branch information
zeenix authored Jan 23, 2025
2 parents 8f3c0f5 + b71b1f4 commit e8ebe3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zbus_macros/src/iface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ pub fn expand(args: Punctuated<Meta, Token![,]>, mut input: ItemImpl) -> syn::Re
get_dispatch.extend(q);

let q = if is_fallible_property {
quote!(
quote!({
#args_from_msg
if let Ok(prop) = self.#ident(#args_names)#method_await {
props.insert(
Expand All @@ -705,9 +705,9 @@ pub fn expand(args: Punctuated<Meta, Token![,]>, mut input: ItemImpl) -> syn::Re
)
.map_err(|e| #zbus::fdo::Error::Failed(e.to_string()))?,
);
})
}})
} else {
quote!(
quote!({
#args_from_msg
props.insert(
::std::string::ToString::to_string(#member_name),
Expand All @@ -717,7 +717,7 @@ pub fn expand(args: Punctuated<Meta, Token![,]>, mut input: ItemImpl) -> syn::Re
),
)
.map_err(|e| #zbus::fdo::Error::Failed(e.to_string()))?,
);)
);})
};

get_all.extend(q);
Expand Down

0 comments on commit e8ebe3b

Please sign in to comment.