diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..ce43a70 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,61 @@ +name: Rust + +on: push + +env: + CARGO_TERM_COLOR: always + +jobs: + + test: + runs-on: ubuntu-latest + steps: + - name: Install stable rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + - uses: actions/checkout@v2 + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --all --all-features + - name: Test + uses: actions-rs/cargo@v1 + with: + command: test + args: --all --all-features + + clippy-check: + runs-on: ubuntu-latest + steps: + - name: Install stable rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + components: clippy + - uses: actions/checkout@v2 + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all --all-features + + rustfmt-check: + runs-on: ubuntu-latest + steps: + - name: Install stable rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + components: rustfmt + - uses: actions/checkout@v2 + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check diff --git a/Cargo.toml b/Cargo.toml index d3ee17a..7e64440 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,8 +10,10 @@ readme = "README.md" keywords = ["send", "sync"] categories = ["rust-patterns", "concurrency"] +exclude = [".github"] + [dependencies] -flume = { version = "0.10", default-features = false } +crossbeam-channel = "0.5" once_cell = "1" [dev-dependencies] diff --git a/src/lib.rs b/src/lib.rs index 0aa309b..eb3915f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,7 @@ non_ascii_idents )] -use flume::{bounded, unbounded, Sender}; +use crossbeam_channel::{bounded, unbounded, Sender}; use once_cell::sync::Lazy; use std::{ fmt,