From bb873b0640af54920b2f3a1f740fd4cc6de3e200 Mon Sep 17 00:00:00 2001 From: Lzzzt <101313294+Lzzzzzt@users.noreply.github.com> Date: Sun, 15 Sep 2024 21:09:57 +0800 Subject: [PATCH] fix: fix an error in CI (#302) * fix clippy Signed-off-by: lzzzt * ci: fix a ci error .github/workflows/ci.sh: 42: [: nightly: unexpected operator Signed-off-by: lzzzt fix: fix an error in tests/fs_symlink.rs Signed-off-by: lzzzt --------- Signed-off-by: lzzzt --- .github/workflows/ci.sh | 4 ++-- monoio/src/blocking.rs | 4 +++- monoio/tests/fs_symlink.rs | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.sh b/.github/workflows/ci.sh index 78fcd454..b8ed913e 100755 --- a/.github/workflows/ci.sh +++ b/.github/workflows/ci.sh @@ -39,7 +39,7 @@ if [ "${NO_RUN}" != "1" ] && [ "${NO_RUN}" != "true" ]; then "${CARGO}" test --target "${TARGET}" --release fi - if [ "${CHANNEL}" == "nightly" ] && ([ "${TARGET}" = "x86_64-unknown-linux-gnu" ] || [ "${TARGET}" = "i686-unknown-linux-gnu" ]); then + if [ "${CHANNEL}" = "nightly" ] && ([ "${TARGET}" = "x86_64-unknown-linux-gnu" ] || [ "${TARGET}" = "i686-unknown-linux-gnu" ]); then "${CARGO}" test --target "${TARGET}" --all-features "${CARGO}" test --target "${TARGET}" --all-features --release fi @@ -53,7 +53,7 @@ if [ "${NO_RUN}" != "1" ] && [ "${NO_RUN}" != "true" ]; then "${CARGO}" test --target "${TARGET}" --no-default-features --features hyper "${CARGO}" test --target "${TARGET}" --no-default-features --features hyper --release - if [ "${CHANNEL}" == "nightly" ]; then + if [ "${CHANNEL}" = "nightly" ]; then "${CARGO}" test --target "${TARGET}" --all-features "${CARGO}" test --target "${TARGET}" --all-features --release fi diff --git a/monoio/src/blocking.rs b/monoio/src/blocking.rs index d28d0dbf..4e6bba7d 100644 --- a/monoio/src/blocking.rs +++ b/monoio/src/blocking.rs @@ -85,7 +85,9 @@ pub enum BlockingStrategy { } /// `spawn_blocking` is used for executing a task(without async) with heavy computation or blocking -/// io. To used it, users may initialize a thread pool and attach it on creating runtime. +/// io. +/// +/// To used it, users may initialize a thread pool and attach it on creating runtime. /// Users can also set `BlockingStrategy` for a runtime when there is no thread pool. /// WARNING: DO NOT USE THIS FOR ASYNC TASK! Async tasks will not be executed but only built the /// future! diff --git a/monoio/tests/fs_symlink.rs b/monoio/tests/fs_symlink.rs index 20bf23e0..0637250f 100644 --- a/monoio/tests/fs_symlink.rs +++ b/monoio/tests/fs_symlink.rs @@ -22,7 +22,7 @@ async fn create_symlink() { .await .unwrap(); - let content = monoio::fs::read(dst_file_path).await.unwrap(); + let content = monoio::fs::read(&dst_file_path).await.unwrap(); assert_eq!(content, TEST_PAYLOAD); - assert(dst_file_path.is_symlink()); + assert!(dst_file_path.is_symlink()); }