Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
manyuanrong committed Jan 19, 2021
1 parent 26fd2c8 commit 63909a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ pub fn add_one_f64(arg: f64) -> f64 {
}

#[no_mangle]
pub extern "C" fn concat_string(str: *const c_char) -> *const c_char {
let str = unsafe { CStr::from_ptr(str) };
pub unsafe extern "C" fn concat_string(str: *const c_char) -> *const c_char {
let str = CStr::from_ptr(str);
let mut hello = String::from("hello ");
hello.push_str(str.to_str().unwrap());
let str = CString::new(hello).unwrap();
Expand Down

0 comments on commit 63909a0

Please sign in to comment.