Skip to content

Commit 2848254

Browse files
committed
No need to make GetCString pub
1 parent 2086102 commit 2848254

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sys/socket/sockopt.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::sys::time::TimeVal;
66
use crate::{errno::Errno, Result};
77
use cfg_if::cfg_if;
88
use libc::{self, c_int, c_void, socklen_t};
9+
#[cfg(apple_targets)]
910
use std::ffi::{CStr, CString};
1011
use std::ffi::{OsStr, OsString};
1112
use std::mem::{self, MaybeUninit};
@@ -1774,14 +1775,13 @@ impl<'a> Set<'a, OsString> for SetOsString<'a> {
17741775
}
17751776

17761777
/// Getter for a `CString` value.
1777-
// Hide the docs, because it's an implementation detail of `sockopt_impl!`
1778-
#[doc(hidden)]
1779-
#[derive(Debug)]
1780-
pub struct GetCString<T: AsMut<[u8]>> {
1778+
#[cfg(apple_targets)]
1779+
struct GetCString<T: AsMut<[u8]>> {
17811780
len: socklen_t,
17821781
val: MaybeUninit<T>,
17831782
}
17841783

1784+
#[cfg(apple_targets)]
17851785
impl<T: AsMut<[u8]>> Get<CString> for GetCString<T> {
17861786
fn uninit() -> Self {
17871787
GetCString {

0 commit comments

Comments
 (0)