Merge branch 'master' into mox692/add_uring_write

This commit is contained in:
Motoyuki Kimura 2025-09-05 01:28:21 +09:00 committed by GitHub
commit 901986c82d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 8 deletions

View File

@ -1462,6 +1462,12 @@ impl fmt::Debug for TcpStream {
}
}
impl AsRef<Self> for TcpStream {
fn as_ref(&self) -> &Self {
self
}
}
#[cfg(unix)]
mod sys {
use super::TcpStream;

View File

@ -1076,6 +1076,12 @@ impl fmt::Debug for UnixStream {
}
}
impl AsRef<Self> for UnixStream {
fn as_ref(&self) -> &Self {
self
}
}
impl AsRawFd for UnixStream {
fn as_raw_fd(&self) -> RawFd {
self.io.as_raw_fd()

View File

@ -716,10 +716,7 @@ impl<T: ?Sized> Mutex<T> {
/// }
/// ```
pub fn get_mut(&mut self) -> &mut T {
unsafe {
// Safety: This is https://github.com/rust-lang/rust/pull/76936
&mut *self.c.get()
}
self.c.get_mut()
}
/// Attempts to acquire the lock, and returns [`TryLockError`] if the lock

View File

@ -1073,10 +1073,7 @@ impl<T: ?Sized> RwLock<T> {
/// }
/// ```
pub fn get_mut(&mut self) -> &mut T {
unsafe {
// Safety: This is https://github.com/rust-lang/rust/pull/76936
&mut *self.c.get()
}
self.c.get_mut()
}
/// Consumes the lock, returning the underlying data.