Skip to content

Commit 16c44ba

Browse files
committed
bindings/c: Fix libsql_query_stmt() error reporting
Let's propagate the error code from the future we block on to the caller of `libsql_query_stmt()`.
1 parent b601185 commit 16c44ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bindings/c/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,13 +720,13 @@ pub unsafe extern "C" fn libsql_query_stmt(
720720
Ok(rows) => {
721721
let rows = Box::leak(Box::new(libsql_rows { result: rows }));
722722
*out_rows = libsql_rows_t::from(rows);
723+
0
723724
}
724725
Err(e) => {
725726
set_err_msg(format!("Error executing statement: {}", e), out_err_msg);
726-
return 1;
727+
1
727728
}
728-
};
729-
0
729+
}
730730
}
731731

732732
#[no_mangle]

0 commit comments

Comments
 (0)