Skip to content

Commit 6449821

Browse files
committed
fix clippy
1 parent d1a109a commit 6449821

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ mio = { version = "1.0", default-features = false }
3333
cfg-if = "1.0.0"
3434
polling = "2.8.0"
3535
educe = "0.6.0"
36-
num-conv = "0.1.0"
3736

3837
libc = "0.2"
3938
rand = "0.9"

core/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ mio = { workspace = true, features = [
4545
nix = { workspace = true, features = ["signal"] }
4646
libc.workspace = true
4747

48-
[target.'cfg(all(any(target_os = "linux", target_os = "android"), target_arch = "x86"))'.dependencies]
49-
num-conv.workspace = true
50-
5148
[target.'cfg(target_os = "linux")'.dependencies]
5249
io-uring = { workspace = true, optional = true }
5350

core/src/coroutine/korosensei.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ use crate::{catch, warn};
77
use corosensei::stack::{DefaultStack, Stack};
88
use corosensei::trap::TrapHandlerRegs;
99
use corosensei::CoroutineResult;
10-
#[cfg(all(any(target_os = "linux", target_os = "android"), target_arch = "x86"))]
11-
use num_conv::CastSigned;
1210
use std::cell::{Cell, RefCell, UnsafeCell};
1311
use std::collections::VecDeque;
1412
use std::ffi::c_longlong;
@@ -59,7 +57,7 @@ impl<'c, Param, Yield, Return> Coroutine<'c, Param, Yield, Return> {
5957
any(target_os = "linux", target_os = "android"),
6058
target_arch = "x86",
6159
))] {
62-
let sp = u64::cast_signed(context.uc_mcontext.gregs[usize::try_from(libc::REG_ESP).expect("overflow")]);
60+
let sp = u64::cast_unsigned(context.uc_mcontext.gregs[usize::try_from(libc::REG_ESP).expect("overflow")].try_into().unwrap());
6361
} else if #[cfg(all(target_vendor = "apple", target_arch = "x86_64"))] {
6462
let sp = u64::try_from((*context.uc_mcontext).__ss.__rsp).expect("overflow");
6563
} else if #[cfg(all(

0 commit comments

Comments
 (0)