Skip to content

Update nix requirement from 0.29 to 0.30 #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ corosensei = "0.2"
core_affinity = "0.8"
crossbeam-utils = "0.8"
crossbeam-skiplist = "0.1"
nix = "0.29"
nix = "0.30"
io-uring = "0.7"
windows-sys = "0.59"
anyhow = "1.0"
Expand Down
1 change: 1 addition & 0 deletions core/src/common/beans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ impl BeanFactory<'_> {
///
/// # Safety
/// Only one mutable reference can be held for a given bean at a time.
#[allow(clippy::mut_from_ref)]
#[must_use]
pub unsafe fn get_mut_bean<B>(bean_name: &str) -> Option<&mut B> {
Self::get_instance()
Expand Down
2 changes: 1 addition & 1 deletion core/src/common/ordered_work_steal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ impl<'l, T: Debug> OrderedLocalQueue<'l, T> {
//本地队列超过一半,不再steal
break;
}
if std::ptr::eq(&another, &self.queue) {
if std::ptr::eq(&raw const another, &raw const self.queue) {
//不能偷自己
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/common/work_steal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl<'l, T: Debug> LocalQueue<'l, T> {
//本地队列超过一半,不再steal
break;
}
if std::ptr::eq(&another, &self.queue) {
if std::ptr::eq(&raw const another, &raw const self.queue) {
//不能偷自己
continue;
}
Expand Down
1 change: 1 addition & 0 deletions core/src/coroutine/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ impl<'c> CoroutineLocal<'c> {
}

/// Get a mut value ref from the coroutine local.
#[allow(clippy::mut_from_ref)]
pub fn get_mut<V>(&self, key: &'c str) -> Option<&mut V> {
self.0
.get(key)
Expand Down
4 changes: 2 additions & 2 deletions core/src/syscall/unix/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl<I: ConnectSyscall> ConnectSyscall for NioConnectSyscall<I> {
libc::SOL_SOCKET,
libc::SO_ERROR,
std::ptr::addr_of_mut!(err).cast::<c_void>(),
&mut len,
&raw mut len,
);
}
if r != 0 {
Expand All @@ -88,7 +88,7 @@ impl<I: ConnectSyscall> ConnectSyscall for NioConnectSyscall<I> {
unsafe {
let mut address = std::mem::zeroed();
let mut address_len = socklen_t::try_from(size_of_val(&address)).expect("overflow");
r = libc::getpeername(fd, &mut address, &mut address_len);
r = libc::getpeername(fd, &raw mut address, &raw mut address_len);
}
} else if errno != Some(libc::EINTR) {
break;
Expand Down
4 changes: 2 additions & 2 deletions core/src/syscall/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ pub extern "C" fn send_time_limit(fd: c_int) -> u64 {
libc::SOL_SOCKET,
libc::SO_SNDTIMEO,
std::ptr::from_mut(&mut tv).cast(),
&mut len,
&raw mut len,
) == -1
{
let error = std::io::Error::last_os_error();
Expand Down Expand Up @@ -1056,7 +1056,7 @@ pub extern "C" fn recv_time_limit(fd: c_int) -> u64 {
libc::SOL_SOCKET,
libc::SO_RCVTIMEO,
std::ptr::from_mut(&mut tv).cast(),
&mut len,
&raw mut len,
) == -1
{
let error = std::io::Error::last_os_error();
Expand Down
2 changes: 1 addition & 1 deletion core/src/syscall/unix/recvmsg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<I: RecvmsgSyscall> RecvmsgSyscall for NioRecvmsgSyscall<I> {
msg_controllen: msghdr.msg_controllen,
msg_flags: msghdr.msg_flags,
};
r = self.inner.recvmsg(fn_ptr, fd, &mut arg, flags);
r = self.inner.recvmsg(fn_ptr, fd, &raw mut arg, flags);
if r == 0 {
std::mem::forget(vec);
if blocking {
Expand Down
2 changes: 1 addition & 1 deletion core/src/syscall/unix/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl<I: SelectSyscall> SelectSyscall for NioSelectSyscall<I> {
loop {
r = self
.inner
.select(fn_ptr, nfds, readfds, writefds, errorfds, &mut o);
.select(fn_ptr, nfds, readfds, writefds, errorfds, &raw mut o);
if r != 0 || t == 0 {
break;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/syscall/unix/sendmsg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<I: SendmsgSyscall> SendmsgSyscall for NioSendmsgSyscall<I> {
msg_controllen: msghdr.msg_controllen,
msg_flags: msghdr.msg_flags,
};
r = self.inner.sendmsg(fn_ptr, fd, &arg, flags);
r = self.inner.sendmsg(fn_ptr, fd, &raw const arg, flags);
if r != -1 {
reset_errno();
sent += libc::size_t::try_from(r).expect("r overflow");
Expand Down
2 changes: 1 addition & 1 deletion open-coroutine/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ fn main() {
.arg(out_dir.clone())
.status()
{
panic!("failed to build dylib {}", e);
panic!("failed to build dylib {e}");
}
// correct dylib path
let hook_deps = out_dir
Expand Down
Loading