Skip to content

Commit ee6e2c2

Browse files
committed
edition 2021 + drop num-cpus dependency, again
Signed-off-by: Marc-Antoine Perennou <[email protected]>
1 parent 5e3645d commit ee6e2c2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/build-and-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
os: [ubuntu-latest, windows-latest, macos-latest]
14-
rust: [nightly, beta, stable, 1.49.0]
14+
rust: [nightly, beta, stable, 1.59.0]
1515
steps:
1616
- uses: actions/checkout@v2
1717

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
[package]
22
name = "async-global-executor"
3-
version = "2.2.0"
3+
version = "2.1.0"
44
authors = ["Marc-Antoine Perennou <[email protected]>"]
55
description = "A global executor built on top of async-executor and async-io"
6-
edition = "2018"
6+
edition = "2021"
77
license = "Apache-2.0 OR MIT"
88
repository = "https://github.com/Keruspe/async-global-executor"
99
homepage = "https://github.com/Keruspe/async-global-executor"
1010
documentation = "https://docs.rs/async-global-executor"
1111
keywords = ["async", "await", "future", "executor"]
1212
categories = ["asynchronous", "concurrency"]
1313
readme = "README.md"
14+
rust-version = "1.59"
1415

1516
[features]
1617
default = ["async-io"]
@@ -24,7 +25,6 @@ async-executor = "^1.4"
2425
async-lock = "^2.5"
2526
blocking = "^1.0"
2627
futures-lite = "^1.0"
27-
num_cpus = "^1.13"
2828
once_cell = "^1.4"
2929

3030
[dependencies.async-io]

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl GlobalExecutorConfig {
6464
.ok()
6565
.and_then(|threads| threads.parse().ok())
6666
.or(self.min_threads)
67-
.unwrap_or_else(num_cpus::get)
67+
.unwrap_or_else(|| std::thread::available_parallelism().map_or(1, usize::from))
6868
.max(1);
6969
let max_threads = self.max_threads.unwrap_or(min_threads * 4).max(min_threads);
7070
Config {

0 commit comments

Comments
 (0)