Skip to content

Commit

Permalink
cargo fmt and fix a minor merge error added superfluous docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jasta committed Jul 14, 2023
1 parent d55d2f4 commit 10a88c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,10 @@ impl Socket {
///
/// [`set_header_included`]: Socket::set_header_included
#[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))))]
#[cfg_attr(
docsrs,
doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))
)]
pub fn header_included(&self) -> io::Result<bool> {
unsafe {
getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_HDRINCL)
Expand All @@ -1134,7 +1137,10 @@ impl Socket {
allow(rustdoc::broken_intra_doc_links)
)]
#[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))))]
#[cfg_attr(
docsrs,
doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))
)]
pub fn set_header_included(&self, included: bool) -> io::Result<()> {
unsafe {
setsockopt(
Expand Down
5 changes: 2 additions & 3 deletions src/sys/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ pub(crate) use libc::{
pub(crate) use libc::MSG_TRUNC;
#[cfg(not(target_os = "redox"))]
pub(crate) use libc::SO_OOBINLINE;
// TODO: Expose in libc for ESP-IDF/LwIP
#[cfg(target_os = "espidf")]
pub(crate) const MSG_TRUNC: libc::c_int = 4; // TODO: Expose in libc for ESP-IDF/LwIP
// Used in `Socket`.
// Used in `Socket`.
pub(crate) const MSG_TRUNC: libc::c_int = 4;
// Used in `Socket`.
#[cfg(not(target_os = "nto"))]
pub(crate) use libc::ipv6_mreq as Ipv6Mreq;
Expand Down

0 comments on commit 10a88c0

Please sign in to comment.