From 17c7ce616c1c874cde33c137b04aa7e4223872f8 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 9 May 2021 22:26:20 +0900 Subject: [PATCH] benches: fix build error (#3769) --- .github/workflows/ci.yml | 7 +++++++ benches/Cargo.toml | 1 + benches/fs.rs | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e4ce10d8..a28cbf984 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,13 @@ jobs: run: cargo hack test --each-feature working-directory: tests-build + # Build benchmarks. Run of benchmarks is done by bench.yml workflow. + - name: build benches + run: cargo build --benches + working-directory: benches + # bench.yml workflow runs benchmarks only on linux. + if: startsWith(matrix.os, 'ubuntu') + valgrind: name: valgrind runs-on: ubuntu-latest diff --git a/benches/Cargo.toml b/benches/Cargo.toml index 34760eabc..eb2784dc5 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -10,6 +10,7 @@ bencher = "0.1.5" [dev-dependencies] tokio-util = { version = "0.6.6", path = "../tokio-util", features = ["full"] } +tokio-stream = { path = "../tokio-stream" } [target.'cfg(unix)'.dependencies] libc = "0.2.42" diff --git a/benches/fs.rs b/benches/fs.rs index f095d5516..305668f9a 100644 --- a/benches/fs.rs +++ b/benches/fs.rs @@ -1,6 +1,6 @@ #![cfg(unix)] -use tokio::stream::StreamExt; +use tokio_stream::StreamExt; use tokio::fs::File; use tokio::io::AsyncReadExt;