Skip to content

Commit 9d80a63

Browse files
committed
🚑️ zm: Don't skip the first arg of signal
The `SignalContext` argument of interface signals are already filtered out so we were ending up filtering it twice and therefore the real first argument.
1 parent aae9fe4 commit 9d80a63

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

zbus_macros/src/iface.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,17 +1339,11 @@ impl Proxy {
13391339
let inputs: Punctuated<PatType, Comma> = method_info
13401340
.typed_inputs
13411341
.iter()
1342-
.enumerate()
1343-
.filter(|(idx, input)| {
1344-
if method_info.method_type == MethodType::Signal {
1345-
// Skip the `SignalContext` argument.
1346-
return *idx != 0;
1347-
}
1348-
1342+
.filter(|input| {
13491343
let a = ArgAttributes::parse(&input.attrs).unwrap();
13501344
!a.object_server && !a.connection && !a.header && !a.signal_context
13511345
})
1352-
.map(|(_, p)| p.clone())
1346+
.cloned()
13531347
.collect();
13541348
let ret = get_return_type(&method_info.output)
13551349
.map(|r| quote!(#r))

0 commit comments

Comments
 (0)