From faf48c2870aa1f1a3e6e41e21f1526e2813f2036 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Sun, 20 Feb 2022 10:27:12 +0100 Subject: [PATCH] Fix small clippy warnings and run it on tests as well on CI --- .github/workflows/build.yml | 3 ++- tests/alarms.rs | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0ccb55..e002a05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,7 +92,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: [1.31.0] + rust: [1.58.1] TARGET: - x86_64-unknown-linux-gnu @@ -109,6 +109,7 @@ jobs: - name: Clippy uses: actions-rs/clippy-check@v1 with: + args: --all-targets -- --allow clippy::bool_assert_comparison token: ${{ secrets.GITHUB_TOKEN }} test: diff --git a/tests/alarms.rs b/tests/alarms.rs index 3402c8a..cbe349d 100644 --- a/tests/alarms.rs +++ b/tests/alarms.rs @@ -669,7 +669,7 @@ mod alarm1_day { match_ms_ignore_invalid_hour, set_alarm1_day, ALARM1_SECONDS, - [4, 3, AM | 0, AM | 1], + [4, 3, AM, AM | 1], DayAlarm1 { day: 1, hour: Hours::H24(24), @@ -721,7 +721,7 @@ mod alarm1_day { match_s_ignore_incorrect_min, set_alarm1_day, ALARM1_SECONDS, - [4, AM | 0, AM | 2, AM | 1], + [4, AM, AM | 2, AM | 1], DayAlarm1 { day: 1, hour: Hours::H24(2), @@ -842,7 +842,7 @@ mod alarm1_weekday { match_s_ignore_incorrect_min, set_alarm1_weekday, ALARM1_SECONDS, - [4, AM | 0, AM | 2, AM | BF::WEEKDAY | 1], + [4, AM, AM | 2, AM | BF::WEEKDAY | 1], WeekdayAlarm1 { weekday: 1, hour: Hours::H24(2), @@ -868,7 +868,7 @@ mod alarm1_weekday { match_ops_ignore_incorrect_sec, set_alarm1_weekday, ALARM1_SECONDS, - [AM | 0, AM | 3, AM | 2, AM | BF::WEEKDAY | 1], + [AM, AM | 3, AM | 2, AM | BF::WEEKDAY | 1], WeekdayAlarm1 { weekday: 1, hour: Hours::H24(2), @@ -964,7 +964,7 @@ mod alarm2_day { match_m_ignore_invalid_h, set_alarm2_day, ALARM2_MINUTES, - [3, AM | 0, AM | 1], + [3, AM, AM | 1], DayAlarm2 { day: 1, hour: Hours::H24(25), @@ -988,7 +988,7 @@ mod alarm2_day { match_opm_ignore_incorrect_min, set_alarm2_day, ALARM2_MINUTES, - [AM | 0, AM | 2, AM | 1], + [AM, AM | 2, AM | 1], DayAlarm2 { day: 1, hour: Hours::H24(2), @@ -1076,7 +1076,7 @@ mod alarm2_weekday { match_m_ignore_invalid_hour, set_alarm2_weekday, ALARM2_MINUTES, - [3, AM | 0, AM | BF::WEEKDAY | 1], + [3, AM, AM | BF::WEEKDAY | 1], WeekdayAlarm2 { weekday: 1, hour: Hours::H24(24), @@ -1100,7 +1100,7 @@ mod alarm2_weekday { match_opm_ignore_incorrect_min, set_alarm2_weekday, ALARM2_MINUTES, - [AM | 0, AM | 2, AM | BF::WEEKDAY | 1], + [AM, AM | 2, AM | BF::WEEKDAY | 1], WeekdayAlarm2 { weekday: 1, hour: Hours::H24(2),