Skip to content

Commit dd5f7af

Browse files
user.emailuser.email
authored andcommitted
fix(client): make blocking event callback signature consistent
Use Fn for blocking Program::on to match async on_internal bounds and resolve task4 client build failures. Made-with: Cursor
1 parent fb7c6d8 commit dd5f7af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/blocking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<C: Deref<Target = impl Signer> + Clone> Program<C> {
9999

100100
pub fn on<T: anchor_lang::Event + anchor_lang::AnchorDeserialize>(
101101
&self,
102-
f: impl FnMut(&EventContext, T) + Send + 'static,
102+
f: impl Fn(&EventContext, T) + Send + 'static,
103103
) -> Result<EventUnsubscriber<'_>, ClientError> {
104104
let (handle, rx) = self.rt.block_on(self.on_internal(f))?;
105105

0 commit comments

Comments
 (0)