Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d9f55aa

Browse files
joboetgitbot
authored and
gitbot
committedMar 3, 2025
std: move network code into sys
As per rust-lang#117276, this PR moves `sys_common::net` and the `sys::pal::net` into the newly created `sys::net` module. In order to support rust-lang#135141, I've moved all the current network code into a separate `connection` module, future functions like `hostname` can live in separate modules. I'll probably do a follow-up PR and clean up some of the actual code, this is mostly just a reorganization.
1 parent 31d80ee commit d9f55aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+113
-1036
lines changed
 

‎std/src/net/socket_addr.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ mod tests;
66
pub use core::net::{SocketAddr, SocketAddrV4, SocketAddrV6};
77

88
use crate::net::{IpAddr, Ipv4Addr, Ipv6Addr};
9-
use crate::sys::net::netc as c;
10-
use crate::sys_common::net::LookupHost;
9+
use crate::sys::net::{LookupHost, netc as c};
1110
use crate::sys_common::{FromInner, IntoInner};
1211
use crate::{io, iter, mem, option, slice, vec};
1312

‎std/src/net/tcp.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ use crate::io::prelude::*;
1515
use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut};
1616
use crate::iter::FusedIterator;
1717
use crate::net::{Shutdown, SocketAddr, ToSocketAddrs};
18-
use crate::sys_common::{AsInner, FromInner, IntoInner, net as net_imp};
18+
use crate::sys::net as net_imp;
19+
use crate::sys_common::{AsInner, FromInner, IntoInner};
1920
use crate::time::Duration;
2021

2122
/// A TCP stream between a local and a remote socket.

0 commit comments

Comments
 (0)
Please sign in to comment.