Browse Source

remove: rust test code

dev
Dnomd343 2 years ago
parent
commit
327ea4c0b4
  1. 1
      .gitignore
  2. 6
      src/to-json/src/ffi.rs

1
.gitignore

@ -2,7 +2,6 @@
/build/
/.idea/
/assets/*.txt
/to-json/target/
/cmake-build-debug/
/cmake-build-release/
/src/to-json/target/

6
src/to-json/src/ffi.rs

@ -9,12 +9,6 @@ pub unsafe extern "C" fn free_rust_string(string: *const c_char) {
#[no_mangle]
pub unsafe extern "C" fn to_json_rust(content: *const c_char) -> *const c_char {
let content: &str = CStr::from_ptr(content).to_str().unwrap();
// TODO: remove test code
println!("Raw content -> {}", content);
// TODO: convert to JSON format
let content: String = to_json(content); // may return empty string
CString::new(content).unwrap().into_raw()
}

Loading…
Cancel
Save