diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9833d5da..52f85f2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ env: jobs: test: + name: test ${{ matrix.channel }}-${{ matrix.target }} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -46,6 +47,11 @@ jobs: log-level: warn command: check arguments: --all-features + - name: Build Docs + uses: actions-rs/cargo@v1 + with: + command: doc + args: --all - name: Run tests env: CHANNEL: ${{ matrix.channel }} diff --git a/Cargo.toml b/Cargo.toml index 8c179d4a..58ce5e8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ members = [ ] [workspace.package] -version = "0.6.14" +version = "0.6.15" edition = "2021" authors = ["zhangzicheng@apache.org"] repository = "https://github.com/acl-dev/open-coroutine" diff --git a/README.md b/README.md index 44be0f98..c97f03c3 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ fn main() { } ``` -## 🪽 Advanced Usage +## 🪶 Advanced Usage ### create a task with priority diff --git a/README_ZH.md b/README_ZH.md index 86f5cd4b..324686a7 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -132,7 +132,7 @@ fn main() { } ``` -## 🪽 进阶使用 +## 🪶 进阶使用 ### 创建具有优先级的任务 diff --git a/core/src/common/ordered_work_steal.rs b/core/src/common/ordered_work_steal.rs index a38f939f..b61b34ec 100644 --- a/core/src/common/ordered_work_steal.rs +++ b/core/src/common/ordered_work_steal.rs @@ -104,7 +104,7 @@ impl OrderedWorkStealQueue { .store(self.len().saturating_sub(1), Ordering::Release); return Some(item); } - Steal::Retry => continue, + Steal::Retry => {} Steal::Empty => break, } } diff --git a/core/src/common/work_steal.rs b/core/src/common/work_steal.rs index 2e671c6f..170d7775 100644 --- a/core/src/common/work_steal.rs +++ b/core/src/common/work_steal.rs @@ -74,7 +74,7 @@ impl WorkStealQueue { .store(self.len().saturating_sub(1), Ordering::Release); return Some(item); } - Steal::Retry => continue, + Steal::Retry => {} Steal::Empty => return None, } } diff --git a/open-coroutine/build.rs b/open-coroutine/build.rs index de120b65..d2b167a6 100644 --- a/open-coroutine/build.rs +++ b/open-coroutine/build.rs @@ -81,9 +81,7 @@ fn main() { ); let crates_parent = if crates_parent_dirs.len() == 1 { crates_parent_dirs.first().expect("host dir not found") - } else { - let rustup_dist_server = - var("RUSTUP_DIST_SERVER").expect("RUSTUP_DIST_SERVER not found"); + } else if let Ok(rustup_dist_server) = var("RUSTUP_DIST_SERVER") { let host = rustup_dist_server .split("://") .last() @@ -109,6 +107,17 @@ fn main() { }) .expect("host dir not found") }) + } else { + crates_parent_dirs + .iter() + .find(|entry| { + entry + .file_name() + .to_string_lossy() + .to_string() + .contains("crates.io") + }) + .expect("host dir not found") } .file_name() .to_string_lossy()