diff --git a/.github/workflows/ci.sh b/.github/workflows/ci.sh index 20296ceb..ab0228b0 100644 --- a/.github/workflows/ci.sh +++ b/.github/workflows/ci.sh @@ -37,7 +37,8 @@ if [ "${NO_RUN}" != "1" ] && [ "${NO_RUN}" != "true" ]; then fi if [ "${TARGET}" != "aarch64-unknown-linux-gnu" ] && [ "${TARGET}" != "armv7-unknown-linux-gnueabihf" ] && - [ "${TARGET}" != "riscv64gc-unknown-linux-gnu" ] && [ "${TARGET}" != "s390x-unknown-linux-gnu" ]; then + [ "${TARGET}" != "riscv64gc-unknown-linux-gnu" ] && [ "${TARGET}" != "s390x-unknown-linux-gnu" ] && + [ "${TARGET}" != "loongarch64-unknown-linux-gnu" ]; then # enable uring+legacy driver "${CARGO}" test --target "${TARGET}" "${CARGO}" test --target "${TARGET}" --release diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b83afe7..8be6e28c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,8 +66,8 @@ jobs: armv7-unknown-linux-gnueabihf, riscv64gc-unknown-linux-gnu, s390x-unknown-linux-gnu, + loongarch64-unknown-linux-gnu, # mips64-unknown-linux-muslabi64, -# loongarch64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin, @@ -92,9 +92,9 @@ jobs: os: ubuntu-latest - target: s390x-unknown-linux-gnu os: ubuntu-latest + - target: loongarch64-unknown-linux-gnu + os: ubuntu-latest # - target: mips64-unknown-linux-muslabi64 -# os: ubuntu-latest -# - target: loongarch64-unknown-linux-gnu # os: ubuntu-latest - target: x86_64-apple-darwin diff --git a/deny.toml b/deny.toml index 959825f4..15264ad4 100644 --- a/deny.toml +++ b/deny.toml @@ -6,7 +6,7 @@ allow = [ "Zlib", "BSD-3-Clause", "Unlicense", - "Unicode-DFS-2016", + "Unicode-3.0", ] confidence-threshold = 0.95 copyleft = "deny" diff --git a/monoio/Cargo.toml b/monoio/Cargo.toml index 29390fb2..e8b261af 100644 --- a/monoio/Cargo.toml +++ b/monoio/Cargo.toml @@ -49,7 +49,7 @@ windows-sys = { version = "0.48.0", features = [ # unix dependencies [target.'cfg(unix)'.dependencies] -nix = { version = "0.26", optional = true } +nix = { version = "0.29", features = ["sched", "ucontext", "process"], optional = true } [target.'cfg(target_os = "linux")'.dependencies] io-uring = { version = "0.6", optional = true } diff --git a/monoio/src/fs/metadata/mod.rs b/monoio/src/fs/metadata/mod.rs index 34b100e5..add23572 100644 --- a/monoio/src/fs/metadata/mod.rs +++ b/monoio/src/fs/metadata/mod.rs @@ -343,9 +343,11 @@ impl MetadataExt for Metadata { self.0.stat.st_nlink.into() } + /// longarch64 need the `into` convert. + #[allow(clippy::useless_conversion)] #[cfg(not(any(target_arch = "aarch64", target_arch = "riscv64")))] fn nlink(&self) -> u64 { - self.0.stat.st_nlink + self.0.stat.st_nlink.into() } fn uid(&self) -> u32 { diff --git a/monoio/src/time/driver/wheel/level.rs b/monoio/src/time/driver/wheel/level.rs index 3d53aec1..fcc5f51b 100644 --- a/monoio/src/time/driver/wheel/level.rs +++ b/monoio/src/time/driver/wheel/level.rs @@ -135,10 +135,7 @@ impl Level { pub(crate) fn next_expiration(&self, now: u64) -> Option { // Use the `occupied` bit field to get the index of the next slot that // needs to be processed. - let slot = match self.next_occupied_slot(now) { - Some(slot) => slot, - None => return None, - }; + let slot = self.next_occupied_slot(now)?; // From the slot index, calculate the `Instant` at which it needs to be // processed. This value *must* be in the future with respect to `now`.