Skip to content

Commit

Permalink
Adjust tcp_quickack feature to allow other os::linux::net features.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillikin committed Sep 18, 2022
1 parent bc7b17c commit fc380ec
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions library/std/src/os/android/net.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Linux and Android-specific definitions for socket options.
//! Android-specific networking functionality.
#![unstable(feature = "tcp_quickack", issue = "96256")]
pub use crate::os::net::tcp::TcpStreamExt;
pub use crate::os::net::linux_ext::tcp::TcpStreamExt;
4 changes: 2 additions & 2 deletions library/std/src/os/linux/net.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Linux and Android-specific definitions for socket options.
//! Linux-specific networking functionality.
#![unstable(feature = "tcp_quickack", issue = "96256")]
pub use crate::os::net::tcp::TcpStreamExt;
pub use crate::os::net::linux_ext::tcp::TcpStreamExt;
9 changes: 9 additions & 0 deletions library/std/src/os/net/linux_ext/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//! Linux and Android-specific networking functionality.
#![doc(cfg(any(target_os = "linux", target_os = "android")))]

#[unstable(feature = "tcp_quickack", issue = "96256")]
pub(crate) mod tcp;

#[cfg(test)]
mod tests;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#[cfg(any(target_os = "android", target_os = "linux",))]
#[test]
fn quickack() {
use crate::{
net::{test::next_test_ip4, TcpListener, TcpStream},
os::net::tcp::TcpStreamExt,
os::net::linux_ext::tcp::TcpStreamExt,
};

macro_rules! t {
Expand Down
9 changes: 3 additions & 6 deletions library/std/src/os/net/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//! Linux and Android-specific definitions for socket options.
//! OS-specific networking functionality.
#![unstable(feature = "tcp_quickack", issue = "96256")]
#![doc(cfg(any(target_os = "linux", target_os = "android",)))]
pub mod tcp;
#[cfg(test)]
mod tests;
#[cfg(any(target_os = "linux", target_os = "android", doc))]
pub(super) mod linux_ext;

0 comments on commit fc380ec

Please sign in to comment.