From 762f65b91ee27b4c63b89670a0df019a0bef62b5 Mon Sep 17 00:00:00 2001 From: Kotauskas Date: Mon, 15 Apr 2024 15:58:27 +0300 Subject: [PATCH] fucking macos --- src/os/unix/local_socket/name_type.rs | 8 +------- src/os/unix/uds_local_socket/listener.rs | 2 +- tests/os/unix/local_socket_fake_ns.rs | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/os/unix/local_socket/name_type.rs b/src/os/unix/local_socket/name_type.rs index 7ad8078..bf1ce15 100644 --- a/src/os/unix/local_socket/name_type.rs +++ b/src/os/unix/local_socket/name_type.rs @@ -1,11 +1,5 @@ use crate::local_socket::{Name, NameInner, NameType, NamespacedNameType, PathNameType}; -use std::{ - borrow::Cow, - ffi::OsStr, - io, - os::unix::ffi::{OsStrExt, OsStringExt}, - path::Path, -}; +use std::{borrow::Cow, ffi::OsStr, io, os::unix::prelude::*, path::Path}; tag_enum!( /// [Mapping](NameType) that produces local socket names referring to Unix domain sockets bound to diff --git a/src/os/unix/uds_local_socket/listener.rs b/src/os/unix/uds_local_socket/listener.rs index 86d6c67..6183f7e 100644 --- a/src/os/unix/uds_local_socket/listener.rs +++ b/src/os/unix/uds_local_socket/listener.rs @@ -40,7 +40,7 @@ impl traits::Listener for Listener { let listener = c_wrappers::bind_and_listen_with_mode( libc::SOCK_STREAM, - &name_to_addr(options.name.borrow(), true)?, + &dbg!(name_to_addr(options.name.borrow(), true))?, nonblocking, options.mode, ) diff --git a/tests/os/unix/local_socket_fake_ns.rs b/tests/os/unix/local_socket_fake_ns.rs index a856296..7978895 100644 --- a/tests/os/unix/local_socket_fake_ns.rs +++ b/tests/os/unix/local_socket_fake_ns.rs @@ -12,7 +12,7 @@ fn test_inner() -> TestResult { .map(Arc::new) }); let (name, _listener) = listen_and_pick_name(&mut namegen, |nm| { - ListenerOptions::new().name(nm.borrow()).create_sync() + dbg!(ListenerOptions::new().name(nm.borrow()).create_sync()) })?; let name = Arc::try_unwrap(name).unwrap(); let _ = Stream::connect(name.borrow()).opname("client connect")?;