Skip to content

Commit 10a88c0

Browse files
committed
cargo fmt and fix a minor merge error added superfluous docs
1 parent d55d2f4 commit 10a88c0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/socket.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,10 @@ impl Socket {
11101110
///
11111111
/// [`set_header_included`]: Socket::set_header_included
11121112
#[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
1113-
#[cfg_attr(docsrs, doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))))]
1113+
#[cfg_attr(
1114+
docsrs,
1115+
doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))
1116+
)]
11141117
pub fn header_included(&self) -> io::Result<bool> {
11151118
unsafe {
11161119
getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_HDRINCL)
@@ -1134,7 +1137,10 @@ impl Socket {
11341137
allow(rustdoc::broken_intra_doc_links)
11351138
)]
11361139
#[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
1137-
#[cfg_attr(docsrs, doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))))]
1140+
#[cfg_attr(
1141+
docsrs,
1142+
doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))
1143+
)]
11381144
pub fn set_header_included(&self, included: bool) -> io::Result<()> {
11391145
unsafe {
11401146
setsockopt(

src/sys/unix.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,9 @@ pub(crate) use libc::{
115115
pub(crate) use libc::MSG_TRUNC;
116116
#[cfg(not(target_os = "redox"))]
117117
pub(crate) use libc::SO_OOBINLINE;
118+
// TODO: Expose in libc for ESP-IDF/LwIP
118119
#[cfg(target_os = "espidf")]
119-
pub(crate) const MSG_TRUNC: libc::c_int = 4; // TODO: Expose in libc for ESP-IDF/LwIP
120-
// Used in `Socket`.
121-
// Used in `Socket`.
120+
pub(crate) const MSG_TRUNC: libc::c_int = 4;
122121
// Used in `Socket`.
123122
#[cfg(not(target_os = "nto"))]
124123
pub(crate) use libc::ipv6_mreq as Ipv6Mreq;

0 commit comments

Comments
 (0)