Skip to content

Commit f9b35e1

Browse files
github-afr3dlight
authored andcommitted
fix build of diode-file-bindings because of aux module refactoring
1 parent b1d1753 commit f9b35e1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

diode-file-bindings/src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(unsafe_code)]
22

3-
use diode::file;
3+
use diode::aux::{self,file};
44
use std::{
55
ffi::{c_char, CStr},
66
net::SocketAddr,
@@ -14,7 +14,7 @@ use std::{
1414
pub unsafe extern "C" fn diode_new_config(
1515
ptr_addr: *const c_char,
1616
buffer_size: u32,
17-
) -> *mut file::Config<file::DiodeSend> {
17+
) -> *mut file::Config<aux::DiodeSend> {
1818
if ptr_addr.is_null() {
1919
return ptr::null_mut();
2020
}
@@ -23,7 +23,7 @@ pub unsafe extern "C" fn diode_new_config(
2323
let socket_addr = SocketAddr::from_str(&rust_addr).expect("ip:port");
2424

2525
let config = Box::new(file::Config {
26-
diode: file::DiodeSend::Tcp(socket_addr),
26+
diode: aux::DiodeSend::Tcp(socket_addr),
2727
buffer_size: buffer_size as usize,
2828
hash: false,
2929
});
@@ -32,7 +32,7 @@ pub unsafe extern "C" fn diode_new_config(
3232

3333
#[no_mangle]
3434
#[allow(clippy::missing_safety_doc)]
35-
pub unsafe extern "C" fn diode_free_config(ptr: *mut file::Config<file::DiodeSend>) {
35+
pub unsafe extern "C" fn diode_free_config(ptr: *mut file::Config<aux::DiodeSend>) {
3636
if ptr.is_null() {
3737
return;
3838
}
@@ -44,7 +44,7 @@ pub unsafe extern "C" fn diode_free_config(ptr: *mut file::Config<file::DiodeSen
4444
#[no_mangle]
4545
#[allow(clippy::missing_safety_doc)]
4646
pub unsafe extern "C" fn diode_send_file(
47-
ptr: *mut file::Config<file::DiodeSend>,
47+
ptr: *mut file::Config<aux::DiodeSend>,
4848
ptr_filepath: *const c_char,
4949
) -> u32 {
5050
if ptr.is_null() {
@@ -64,19 +64,19 @@ pub unsafe extern "C" fn diode_send_file(
6464
#[no_mangle]
6565
#[allow(clippy::missing_safety_doc)]
6666
pub unsafe extern "C" fn diode_receive_files(
67-
ptr: *mut file::Config<file::DiodeSend>,
67+
ptr: *mut file::Config<aux::DiodeSend>,
6868
ptr_odir: *const c_char,
6969
) {
7070
if ptr.is_null() {
7171
return;
7272
}
7373
let config = unsafe { ptr.as_ref() }.expect("config");
74-
let file::DiodeSend::Tcp(socket_addr) = config.diode else {
74+
let aux::DiodeSend::Tcp(socket_addr) = config.diode else {
7575
return;
7676
};
7777

7878
let config = file::Config {
79-
diode: file::DiodeReceive {
79+
diode: aux::DiodeReceive {
8080
from_tcp: Some(socket_addr),
8181
from_unix: None,
8282
},

0 commit comments

Comments
 (0)