Skip to content

Commit d32a5f6

Browse files
committed
Update nix requirement from 0.29 to 0.30
1 parent 272c550 commit d32a5f6

File tree

11 files changed

+13
-11
lines changed

11 files changed

+13
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ corosensei = "0.2"
3939
core_affinity = "0.8"
4040
crossbeam-utils = "0.8"
4141
crossbeam-skiplist = "0.1"
42-
nix = "0.29"
42+
nix = "0.30"
4343
io-uring = "0.7"
4444
windows-sys = "0.59"
4545
anyhow = "1.0"

core/src/common/beans.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ impl BeanFactory<'_> {
5656
///
5757
/// # Safety
5858
/// Only one mutable reference can be held for a given bean at a time.
59+
#[allow(clippy::mut_from_ref)]
5960
#[must_use]
6061
pub unsafe fn get_mut_bean<B>(bean_name: &str) -> Option<&mut B> {
6162
Self::get_instance()

core/src/common/ordered_work_steal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ impl<'l, T: Debug> OrderedLocalQueue<'l, T> {
367367
//本地队列超过一半,不再steal
368368
break;
369369
}
370-
if std::ptr::eq(&another, &self.queue) {
370+
if std::ptr::eq(&raw const another, &raw const self.queue) {
371371
//不能偷自己
372372
continue;
373373
}

core/src/common/work_steal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl<'l, T: Debug> LocalQueue<'l, T> {
299299
//本地队列超过一半,不再steal
300300
break;
301301
}
302-
if std::ptr::eq(&another, &self.queue) {
302+
if std::ptr::eq(&raw const another, &raw const self.queue) {
303303
//不能偷自己
304304
continue;
305305
}

core/src/coroutine/local.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ impl<'c> CoroutineLocal<'c> {
2727
}
2828

2929
/// Get a mut value ref from the coroutine local.
30+
#[allow(clippy::mut_from_ref)]
3031
pub fn get_mut<V>(&self, key: &'c str) -> Option<&mut V> {
3132
self.0
3233
.get(key)

core/src/syscall/unix/connect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<I: ConnectSyscall> ConnectSyscall for NioConnectSyscall<I> {
7373
libc::SOL_SOCKET,
7474
libc::SO_ERROR,
7575
std::ptr::addr_of_mut!(err).cast::<c_void>(),
76-
&mut len,
76+
&raw mut len,
7777
);
7878
}
7979
if r != 0 {
@@ -88,7 +88,7 @@ impl<I: ConnectSyscall> ConnectSyscall for NioConnectSyscall<I> {
8888
unsafe {
8989
let mut address = std::mem::zeroed();
9090
let mut address_len = socklen_t::try_from(size_of_val(&address)).expect("overflow");
91-
r = libc::getpeername(fd, &mut address, &mut address_len);
91+
r = libc::getpeername(fd, &raw mut address, &raw mut address_len);
9292
}
9393
} else if errno != Some(libc::EINTR) {
9494
break;

core/src/syscall/unix/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ pub extern "C" fn send_time_limit(fd: c_int) -> u64 {
10271027
libc::SOL_SOCKET,
10281028
libc::SO_SNDTIMEO,
10291029
std::ptr::from_mut(&mut tv).cast(),
1030-
&mut len,
1030+
&raw mut len,
10311031
) == -1
10321032
{
10331033
let error = std::io::Error::last_os_error();
@@ -1056,7 +1056,7 @@ pub extern "C" fn recv_time_limit(fd: c_int) -> u64 {
10561056
libc::SOL_SOCKET,
10571057
libc::SO_RCVTIMEO,
10581058
std::ptr::from_mut(&mut tv).cast(),
1059-
&mut len,
1059+
&raw mut len,
10601060
) == -1
10611061
{
10621062
let error = std::io::Error::last_os_error();

core/src/syscall/unix/recvmsg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<I: RecvmsgSyscall> RecvmsgSyscall for NioRecvmsgSyscall<I> {
101101
msg_controllen: msghdr.msg_controllen,
102102
msg_flags: msghdr.msg_flags,
103103
};
104-
r = self.inner.recvmsg(fn_ptr, fd, &mut arg, flags);
104+
r = self.inner.recvmsg(fn_ptr, fd, &raw mut arg, flags);
105105
if r == 0 {
106106
std::mem::forget(vec);
107107
if blocking {

core/src/syscall/unix/select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<I: SelectSyscall> SelectSyscall for NioSelectSyscall<I> {
8484
loop {
8585
r = self
8686
.inner
87-
.select(fn_ptr, nfds, readfds, writefds, errorfds, &mut o);
87+
.select(fn_ptr, nfds, readfds, writefds, errorfds, &raw mut o);
8888
if r != 0 || t == 0 {
8989
break;
9090
}

core/src/syscall/unix/sendmsg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<I: SendmsgSyscall> SendmsgSyscall for NioSendmsgSyscall<I> {
101101
msg_controllen: msghdr.msg_controllen,
102102
msg_flags: msghdr.msg_flags,
103103
};
104-
r = self.inner.sendmsg(fn_ptr, fd, &arg, flags);
104+
r = self.inner.sendmsg(fn_ptr, fd, &raw const arg, flags);
105105
if r != -1 {
106106
reset_errno();
107107
sent += libc::size_t::try_from(r).expect("r overflow");

0 commit comments

Comments
 (0)