Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/RustServer/benches/diff_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::ffi::CStr;
use std::os::raw::c_char;

// Import the FFI functions from the library crate
extern "C" {
unsafe extern "C" {
fn rustserver_diff_trees(
old_json_ptr: *const u8,
old_json_len: i32,
Expand Down
12 changes: 6 additions & 6 deletions src/RustServer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ mod tests {
let mut out_len: i32 = 0;
let result = unsafe {
rustserver_diff_trees(
old.as_ptr() as *const u8,
old.as_ptr(),
old.len() as i32,
new.as_ptr() as *const u8,
new.as_ptr(),
new.len() as i32,
&mut out_len,
)
Expand Down Expand Up @@ -360,9 +360,9 @@ mod tests {
let mut out_len: i32 = 0;
let result = unsafe {
rustserver_apply_patch(
json.as_ptr() as *const u8,
json.as_ptr(),
json.len() as i32,
patch.as_ptr() as *const u8,
patch.as_ptr(),
patch.len() as i32,
&mut out_len,
)
Expand Down Expand Up @@ -415,7 +415,7 @@ mod tests {
rustserver_apply_patch(
std::ptr::null(),
5,
patch.as_ptr() as *const u8,
patch.as_ptr(),
patch.len() as i32,
&mut out_len,
)
Expand All @@ -430,7 +430,7 @@ mod tests {
let mut out_len: i32 = -1;
let result = unsafe {
rustserver_apply_patch(
json.as_ptr() as *const u8,
json.as_ptr(),
json.len() as i32,
std::ptr::null(),
5,
Expand Down
Loading