Skip to content

Commit fc380ec

Browse files
committed
Adjust tcp_quickack feature to allow other os::linux::net features.
1 parent bc7b17c commit fc380ec

File tree

6 files changed

+17
-12
lines changed

6 files changed

+17
-12
lines changed

library/std/src/os/android/net.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Linux and Android-specific definitions for socket options.
1+
//! Android-specific networking functionality.
22
33
#![unstable(feature = "tcp_quickack", issue = "96256")]
4-
pub use crate::os::net::tcp::TcpStreamExt;
4+
pub use crate::os::net::linux_ext::tcp::TcpStreamExt;

library/std/src/os/linux/net.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Linux and Android-specific definitions for socket options.
1+
//! Linux-specific networking functionality.
22
33
#![unstable(feature = "tcp_quickack", issue = "96256")]
4-
pub use crate::os::net::tcp::TcpStreamExt;
4+
pub use crate::os::net::linux_ext::tcp::TcpStreamExt;
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//! Linux and Android-specific networking functionality.
2+
3+
#![doc(cfg(any(target_os = "linux", target_os = "android")))]
4+
5+
#[unstable(feature = "tcp_quickack", issue = "96256")]
6+
pub(crate) mod tcp;
7+
8+
#[cfg(test)]
9+
mod tests;

library/std/src/os/net/tests.rs renamed to library/std/src/os/net/linux_ext/tests.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
#[cfg(any(target_os = "android", target_os = "linux",))]
21
#[test]
32
fn quickack() {
43
use crate::{
54
net::{test::next_test_ip4, TcpListener, TcpStream},
6-
os::net::tcp::TcpStreamExt,
5+
os::net::linux_ext::tcp::TcpStreamExt,
76
};
87

98
macro_rules! t {

library/std/src/os/net/mod.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
//! Linux and Android-specific definitions for socket options.
1+
//! OS-specific networking functionality.
22
3-
#![unstable(feature = "tcp_quickack", issue = "96256")]
4-
#![doc(cfg(any(target_os = "linux", target_os = "android",)))]
5-
pub mod tcp;
6-
#[cfg(test)]
7-
mod tests;
3+
#[cfg(any(target_os = "linux", target_os = "android", doc))]
4+
pub(super) mod linux_ext;

0 commit comments

Comments
 (0)