From 9912622dc1bcca4bc4da18a3d2099d75d17a765a Mon Sep 17 00:00:00 2001 From: Trivernis Date: Tue, 19 Apr 2022 12:06:50 +0200 Subject: [PATCH] Add clippy task and fix antipattern Signed-off-by: Trivernis --- .github/workflows/lint.yml | 33 +++++++++++++++++++++++++++++++++ src/ipc/builder.rs | 4 ++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..2dcd14b5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +name: Lint project files + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +env: + CARGO_TERM_COLOR: always + +jobs: + + lint: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Cache build data + uses: actions/cache@v2 + with: + path: | + target + ~/.cargo/ + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Clippy + run: cargo clippy \ No newline at end of file diff --git a/src/ipc/builder.rs b/src/ipc/builder.rs index 6bcfdd4c..85fb15d4 100644 --- a/src/ipc/builder.rs +++ b/src/ipc/builder.rs @@ -98,8 +98,8 @@ where timeout: Duration::from_secs(60), #[cfg(feature = "serialize")] default_serializer: DynamicSerializer::first_available(), - listener_options: Default::default(), - stream_options: Default::default(), + listener_options: L::ListenerOptions::default(), + stream_options: ::StreamOptions::default(), } }