Merge pull request #336 from Luni-4/fix-clippy

Fix the clippy-action
This commit is contained in:
est31 2019-10-04 12:32:38 +02:00 committed by GitHub
commit 3498336239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -5,6 +5,8 @@ on: [push, pull_request]
jobs:
clippy-test:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:

View File

@ -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 {