Skip to content

Commit 9d52735

Browse files
authored
Update nix requirement from 0.29 to 0.30 (#406)
2 parents 272c550 + 51324ad commit 9d52735

File tree

17 files changed

+25
-21
lines changed

17 files changed

+25
-21
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install toolchain
2525
uses: actions-rs/toolchain@v1
2626
with:
27-
toolchain: 1.81.0
27+
toolchain: stable
2828
profile: minimal
2929
override: true
3030
components: llvm-tools-preview

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/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub fn page_size() -> usize {
160160
cfg_if::cfg_if! {
161161
if #[cfg(windows)] {
162162
let mut info = std::mem::zeroed();
163-
windows_sys::Win32::System::SystemInformation::GetSystemInfo(&mut info);
163+
windows_sys::Win32::System::SystemInformation::GetSystemInfo(&raw mut info);
164164
ret = usize::try_from(info.dwPageSize).expect("get page size failed");
165165
} else {
166166
ret = usize::try_from(libc::sysconf(libc::_SC_PAGESIZE)).expect("get page size failed");

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/net/operator/linux/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ impl Operator<'_> {
235235
self,
236236
SUPPORT_TIMEOUT_ADD,
237237
Timeout,
238-
Timeout::new(&timeout).build().user_data(user_data as u64)
238+
Timeout::new(&raw const timeout)
239+
.build()
240+
.user_data(user_data as u64)
239241
)
240242
}
241243
Ok(())
@@ -254,7 +256,7 @@ impl Operator<'_> {
254256
self,
255257
SUPPORT_TIMEOUT_UPDATE,
256258
TimeoutUpdate,
257-
TimeoutUpdate::new(user_data as u64, &timeout)
259+
TimeoutUpdate::new(user_data as u64, &raw const timeout)
258260
.build()
259261
.user_data(user_data as u64)
260262
)

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();

0 commit comments

Comments
 (0)