From 8234df7f3d16d51e7733f0abf2151346dcaa0633 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Fri, 4 Oct 2019 11:54:11 +0200 Subject: [PATCH 1/2] Fix clippy --- src/host/alsa/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/host/alsa/mod.rs b/src/host/alsa/mod.rs index 909c67b..afc32c6 100644 --- a/src/host/alsa/mod.rs +++ b/src/host/alsa/mod.rs @@ -301,12 +301,8 @@ impl Device { return Err(err.into()); } - let sample_rates = if min_rate == max_rate { - vec![(min_rate, max_rate)] - } else if alsa::snd_pcm_hw_params_test_rate(handle, - hw_params.0, - min_rate + 1, - 0) == 0 + let sample_rates = if min_rate == max_rate || + alsa::snd_pcm_hw_params_test_rate(handle, hw_params.0, min_rate + 1, 0) == 0 { vec![(min_rate, max_rate)] } else { From 4e47c7ea8d1f152d1c9bf929a973da26a5a12242 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Fri, 4 Oct 2019 12:20:40 +0200 Subject: [PATCH 2/2] Disable the clippy-action for pull requests --- .github/workflows/cpal.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cpal.yml b/.github/workflows/cpal.yml index 41dd9bd..c7c8fa5 100644 --- a/.github/workflows/cpal.yml +++ b/.github/workflows/cpal.yml @@ -5,6 +5,8 @@ on: [push, pull_request] jobs: clippy-test: + if: github.event_name == 'push' + runs-on: ubuntu-latest steps: