Skip to content

Commit e02ef66

Browse files
r3dlightgithub-af
authored andcommitted
1 parent 750e03c commit e02ef66

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

diode-file-bindings/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{
99
str::FromStr,
1010
};
1111

12-
#[no_mangle]
12+
#[unsafe(no_mangle)]
1313
#[allow(clippy::missing_safety_doc)]
1414
pub unsafe extern "C" fn diode_new_config(
1515
ptr_addr: *const c_char,
@@ -30,7 +30,7 @@ pub unsafe extern "C" fn diode_new_config(
3030
Box::into_raw(config)
3131
}
3232

33-
#[no_mangle]
33+
#[unsafe(no_mangle)]
3434
#[allow(clippy::missing_safety_doc)]
3535
pub unsafe extern "C" fn diode_free_config(ptr: *mut file::Config<aux::DiodeSend>) {
3636
if ptr.is_null() {
@@ -41,7 +41,7 @@ pub unsafe extern "C" fn diode_free_config(ptr: *mut file::Config<aux::DiodeSend
4141
}
4242
}
4343

44-
#[no_mangle]
44+
#[unsafe(no_mangle)]
4545
#[allow(clippy::missing_safety_doc)]
4646
pub unsafe extern "C" fn diode_send_file(
4747
ptr: *mut file::Config<aux::DiodeSend>,
@@ -61,7 +61,7 @@ pub unsafe extern "C" fn diode_send_file(
6161
file::send::send_file(config, &rust_filepath).unwrap_or(0) as u32
6262
}
6363

64-
#[no_mangle]
64+
#[unsafe(no_mangle)]
6565
#[allow(clippy::missing_safety_doc)]
6666
pub unsafe extern "C" fn diode_receive_files(
6767
ptr: *mut file::Config<aux::DiodeSend>,

0 commit comments

Comments
 (0)