From 926dd17892285b02cef09cb46260e02bd2d81f73 Mon Sep 17 00:00:00 2001 From: quininer Date: Sun, 12 Jan 2020 01:06:15 +0800 Subject: [PATCH] Update README --- Cargo.toml | 3 +- tokio-rustls/.github/actions-rs/grcov.yml | 4 -- tokio-rustls/.github/workflows/ci.yml | 45 ----------------------- tokio-rustls/.gitignore | 2 - tokio-rustls/Cargo.toml | 7 +--- tokio-rustls/README.md | 7 ++-- tokio-rustls/tests/early-data.rs | 22 +++-------- 7 files changed, 12 insertions(+), 78 deletions(-) delete mode 100644 tokio-rustls/.github/actions-rs/grcov.yml delete mode 100644 tokio-rustls/.github/workflows/ci.yml delete mode 100644 tokio-rustls/.gitignore diff --git a/Cargo.toml b/Cargo.toml index 266de47..141e94b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] members = [ - "tokio-native-tls" + "tokio-native-tls", + "tokio-rustls" ] diff --git a/tokio-rustls/.github/actions-rs/grcov.yml b/tokio-rustls/.github/actions-rs/grcov.yml deleted file mode 100644 index 477274f..0000000 --- a/tokio-rustls/.github/actions-rs/grcov.yml +++ /dev/null @@ -1,4 +0,0 @@ -branch: true -llvm: true -output-type: lcov -output-file: ./lcov.info diff --git a/tokio-rustls/.github/workflows/ci.yml b/tokio-rustls/.github/workflows/ci.yml deleted file mode 100644 index 96eb2c0..0000000 --- a/tokio-rustls/.github/workflows/ci.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Rust - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - override: true - - - uses: actions/cache@v1 - with: - path: ~/.cargo - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - - - uses: actions-rs/cargo@v1 - with: - command: test - args: --features early-data,unstable - env: - 'CARGO_INCREMENTAL': '0' - 'RUSTFLAGS': '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads' - - - name: Check - run: | - cd examples/client - cargo check - cd ../server - cargo check - - - id: grcov - uses: actions-rs/grcov@v0.1 - - - name: Update Codecov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ${{ steps.grcov.outputs.report }} diff --git a/tokio-rustls/.gitignore b/tokio-rustls/.gitignore deleted file mode 100644 index a9d37c5..0000000 --- a/tokio-rustls/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -target -Cargo.lock diff --git a/tokio-rustls/Cargo.toml b/tokio-rustls/Cargo.toml index 47052bc..0fcb8c5 100644 --- a/tokio-rustls/Cargo.toml +++ b/tokio-rustls/Cargo.toml @@ -3,17 +3,14 @@ name = "tokio-rustls" version = "0.12.2" authors = ["quininer kel "] license = "MIT/Apache-2.0" -repository = "https://github.com/quininer/tokio-rustls" -homepage = "https://github.com/quininer/tokio-rustls" +repository = "https://github.com/tokio-rs/tls" +homepage = "https://github.com/tokio-rs/tls" documentation = "https://docs.rs/tokio-rustls" readme = "README.md" description = "Asynchronous TLS/SSL streams for Tokio using Rustls." categories = ["asynchronous", "cryptography", "network-programming"] edition = "2018" -[badges] -github-actions = { repository = "quininer/tokio-rustls", workflow = "Rust" } - [dependencies] tokio = "0.2.0" futures-core = "0.3.1" diff --git a/tokio-rustls/README.md b/tokio-rustls/README.md index 751da83..6faef8f 100644 --- a/tokio-rustls/README.md +++ b/tokio-rustls/README.md @@ -1,9 +1,8 @@ # tokio-rustls -[![github actions](https://github.com/quininer/tokio-rustls/workflows/Rust/badge.svg)](https://github.com/quininer/tokio-rustls/actions) -[![codecov](https://codecov.io/gh/quininer/tokio-rustls/branch/master/graph/badge.svg)](https://codecov.io/gh/quininer/tokio-rustls) +[![github actions](https://github.com/tokio-rs/tls/workflows/Rust/badge.svg)](https://github.com/tokio-rs/tls/actions) [![crates](https://img.shields.io/crates/v/tokio-rustls.svg)](https://crates.io/crates/tokio-rustls) -[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/quininer/tokio-rustls/blob/master/LICENSE-MIT) -[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/quininer/tokio-rustls/blob/master/LICENSE-APACHE) +[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/tokio-rs/tls/blob/master/tokio-rustls/LICENSE-MIT) +[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/tokio-rs/tls/blob/master/tokio-rustls/LICENSE-APACHE) [![docs.rs](https://docs.rs/tokio-rustls/badge.svg)](https://docs.rs/tokio-rustls/) Asynchronous TLS/SSL streams for [Tokio](https://tokio.rs/) using diff --git a/tokio-rustls/tests/early-data.rs b/tokio-rustls/tests/early-data.rs index c69750e..35523e0 100644 --- a/tokio-rustls/tests/early-data.rs +++ b/tokio-rustls/tests/early-data.rs @@ -97,24 +97,12 @@ async fn test_0rtt() -> io::Result<()> { let stdout = handle.0.stdout.as_mut().unwrap(); let mut lines = BufReader::new(stdout).lines(); - let mut f1 = false; - let mut f2 = false; + let has_msg1 = lines.by_ref() + .any(|line| line.unwrap().contains("hello")); + let has_msg2 = lines.by_ref() + .any(|line| line.unwrap().contains("world!")); - for line in lines.by_ref() { - if line?.contains("hello") { - f1 = true; - break - } - } - - for line in lines.by_ref() { - if line?.contains("world!") { - f2 = true; - break - } - } - - assert!(f1 && f2); + assert!(has_msg1 && has_msg2); Ok(()) }