From 556d7992ce5566888678ed2fb2058e06259028bd Mon Sep 17 00:00:00 2001 From: k-nasa Date: Thu, 28 Nov 2019 15:57:22 +0900 Subject: [PATCH 1/5] test: fix failed doc test --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d0c87ff..2cca5e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -152,6 +152,8 @@ //! Await two futures concurrently, and return a tuple of their output: //! //! ``` +//! use async_std::prelude::*; +//! //! #[async_std::main] //! async fn main() { //! let a = async { 1u8 }; @@ -167,7 +169,7 @@ //! //! #[async_std::main] //! async fn main() -> std::io::Result<()> { -//! let mut socket = UdpSocket::bind("127.0.0.1:8080")?; +//! let socket = UdpSocket::bind("127.0.0.1:8080").await?; //! println!("Listening on {}", socket.local_addr()?); //! //! let mut buf = vec![0u8; 1024]; From fe04cf26b6f9d09cf6ae09cf9f70160415c44986 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Thu, 28 Nov 2019 16:16:39 +0900 Subject: [PATCH 2/5] test: fix stream::throttle doc test --- src/stream/stream/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream/stream/mod.rs b/src/stream/stream/mod.rs index f7a1ba2..d77fdc8 100644 --- a/src/stream/stream/mod.rs +++ b/src/stream/stream/mod.rs @@ -348,7 +348,7 @@ extension_trait! { assert!(start.elapsed().as_millis() >= 15); s.next().await; - assert!(start.elapsed().as_millis() >= 35); + assert!(start.elapsed().as_millis() >= 25); # # }) } ``` From 44e38eae5950bc8d8803f010588d0c6e95ed12cb Mon Sep 17 00:00:00 2001 From: k-nasa Date: Thu, 28 Nov 2019 19:52:46 +0900 Subject: [PATCH 3/5] fix open_file test code --- tests/verbose_errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/verbose_errors.rs b/tests/verbose_errors.rs index 1563092..17d4261 100644 --- a/tests/verbose_errors.rs +++ b/tests/verbose_errors.rs @@ -8,7 +8,7 @@ fn open_file() { match res { Ok(_) => panic!("Found file with random name: We live in a simulation"), Err(e) => assert_eq!( - "Could not open `/ashjudlkahasdasdsikdhajik/asdasdasdasdasdasd/fjuiklashdbflasas`", + "could not open `/ashjudlkahasdasdsikdhajik/asdasdasdasdasdasd/fjuiklashdbflasas`", &format!("{}", e) ), } From 7d9a06300245b5a32e65dece153a0a12bed6d942 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Thu, 28 Nov 2019 20:53:47 +0900 Subject: [PATCH 4/5] fix cargo test arguments on ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27f0318..f1a71c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --all --features unstable attributes + args: --all --features "unstable attributes" check_fmt_and_docs: name: Checking fmt and docs From c85e2496b1345efbd66ecc648fa12ed151eecd4a Mon Sep 17 00:00:00 2001 From: k-nasa Date: Thu, 28 Nov 2019 20:54:07 +0900 Subject: [PATCH 5/5] Enable doc test on ci --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1a71c1..bee2562 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,12 @@ jobs: command: test args: --all --features "unstable attributes" + - name: documentation test + uses: actions-rs/cargo@v1 + with: + command: test + args: --doc --features "unstable attributes" + check_fmt_and_docs: name: Checking fmt and docs runs-on: ubuntu-latest