Skip to content

Commit fec2663

Browse files
committed
formatting
1 parent 591c001 commit fec2663

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/rust/lib_ccxr/src/share/functions.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ use crate::common::Options;
22
use crate::share::ccxr_sub_entry_message::CcxSubEntryMessage;
33
use crate::util::log::{debug, DebugMessageFlag};
44
use lazy_static::lazy_static;
5-
use nanomsg_sys::{nn_bind, nn_send, nn_setsockopt, nn_shutdown, nn_socket, size_t, AF_SP, NN_LINGER, NN_PUB, NN_SOL_SOCKET};
5+
use nanomsg_sys::{
6+
nn_bind, nn_send, nn_setsockopt, nn_shutdown, nn_socket, AF_SP, NN_LINGER, NN_PUB,
7+
NN_SOL_SOCKET,
8+
};
69
use prost::Message;
710
use std::cmp::PartialEq;
811
use std::ffi::c_void;
@@ -304,7 +307,7 @@ pub unsafe fn ccxr_share_start(stream_name: Option<&str>) -> CcxShareStatus {
304307
NN_SOL_SOCKET,
305308
NN_LINGER,
306309
&linger as *const _ as *const c_void,
307-
std::mem::size_of::<i32>() as size_t,
310+
size_of::<i32>(),
308311
);
309312
if ret < 0 {
310313
debug!(msg_type = DebugMessageFlag::SHARE; "[share] ccx_share_start: can't nn_setsockopt()");

src/rust/src/libccxr_exports/share.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ pub unsafe extern "C" fn ccxr_sub_entries_print_c(entries: *const CcxSubEntries)
4949

5050
/// C-compatible function to start the sharing service.
5151
#[no_mangle]
52-
pub unsafe extern "C" fn ccxr_share_start_c(stream_name: *const std::os::raw::c_char) -> CcxShareStatus {
52+
pub unsafe extern "C" fn ccxr_share_start_c(
53+
stream_name: *const std::os::raw::c_char,
54+
) -> CcxShareStatus {
5355
if stream_name.is_null() {
5456
return ccxr_share_start(Option::from("unknown"));
5557
}

0 commit comments

Comments
 (0)