Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Sep 12, 2024
1 parent db88076 commit 1288b6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/closures/query_closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ pub extern "C" fn z_closure_query_drop(closure_: &mut z_moved_closure_query_t) {
impl<F: Fn(&mut z_loaned_query_t)> From<F> for z_owned_closure_query_t {
fn from(f: F) -> Self {
let this = Box::into_raw(Box::new(f)) as _;
extern "C" fn call<F: Fn(&mut z_loaned_query_t)>(query: &mut z_loaned_query_t, this: *mut c_void) {
extern "C" fn call<F: Fn(&mut z_loaned_query_t)>(
query: &mut z_loaned_query_t,
this: *mut c_void,
) {
let this = unsafe { &*(this as *const F) };
this(query)
}
Expand Down
5 changes: 4 additions & 1 deletion src/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,10 @@ pub extern "C" fn zc_publisher_matching_listener_declare(
let mut status = zc_matching_status_t {
matching: matching_status.matching_subscribers(),
};
zc_closure_matching_status_call(zc_closure_matching_status_loan(&callback), &mut status);
zc_closure_matching_status_call(
zc_closure_matching_status_loan(&callback),
&mut status,
);
})
.wait();
match listener {
Expand Down

0 comments on commit 1288b6e

Please sign in to comment.