remove unnecessary features from async-std & tokio

This commit is contained in:
MaxOhn
2021-05-07 12:44:10 +02:00
parent 10d42de58e
commit 67c6ad8d8e
7 changed files with 20 additions and 8 deletions
+2 -1
View File
@@ -1,12 +1,13 @@
## Upcoming
- Nothing as of now
- Reduced amount of required features of `async_std` and `async_tokio`
# v0.2.2
- osu & fruits:
- Fixed specific slider patterns
- Optimized Bezier, Catmull, and other small things
Benchmarking for osu!standard showed a 25%+ improvement for performance aswell as accuracy
- fruits:
+7 -1
View File
@@ -31,6 +31,8 @@ async_tokio = ["tokio"]
[dependencies.async-std]
version = "1.9"
optional = true
default-features = false
features = ["async-io", "std"]
[dependencies.tokio]
version = "1.2"
@@ -40,4 +42,8 @@ features = ["io-util"]
[dev-dependencies.tokio]
version = "1.2"
features = ["fs", "rt-multi-thread"]
features = ["fs", "rt"]
[dev-dependencies.async-std]
version = "1.9"
default-features = true
+3 -2
View File
@@ -855,9 +855,10 @@ mod tests {
#[cfg(feature = "async_tokio")]
#[test]
fn parsing_async_tokio() {
use tokio::{fs::File, runtime::Runtime};
use tokio::{fs::File, runtime::Builder};
Runtime::new()
Builder::new_current_thread()
.build()
.expect("could not start runtime")
.block_on(async {
let map_id = map_id();
+2 -1
View File
@@ -68,7 +68,8 @@ fn fruits_sync() {
#[cfg(feature = "async_tokio")]
#[test]
fn fruits_async_tokio() {
tokio::runtime::Runtime::new()
tokio::runtime::Builder::new_current_thread()
.build()
.expect("could not start runtime")
.block_on(async {
for result in RESULTS {
+2 -1
View File
@@ -68,7 +68,8 @@ fn mania_sync() {
#[cfg(feature = "async_tokio")]
#[test]
fn mania_async_tokio() {
tokio::runtime::Runtime::new()
tokio::runtime::Builder::new_current_thread()
.build()
.expect("could not start runtime")
.block_on(async {
for result in RESULTS {
+2 -1
View File
@@ -82,7 +82,8 @@ fn osu_sync() {
#[cfg(feature = "async_tokio")]
#[test]
fn osu_async_tokio() {
tokio::runtime::Runtime::new()
tokio::runtime::Builder::new_current_thread()
.build()
.expect("could not start runtime")
.block_on(async {
for result in RESULTS {
+2 -1
View File
@@ -68,7 +68,8 @@ fn taiko_sync() {
#[cfg(feature = "async_tokio")]
#[test]
fn taiko_async_tokio() {
tokio::runtime::Runtime::new()
tokio::runtime::Builder::new_current_thread()
.build()
.expect("could not start runtime")
.block_on(async {
for result in RESULTS {