diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index 5e52309..b93beb9 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -2,6 +2,7 @@ name: "Build Releases" on: workflow_call: + workflow_dispatch: env: RUST_BACKTRACE: full @@ -15,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - target: [x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf, arm-unknown-linux-gnueabihf] + target: [x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf, arm-unknown-linux-gnueabihf, aarch64-unknown-linux-gnu] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba0e91e..f1e3486 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - target: [x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf, arm-unknown-linux-gnueabihf] + target: [x86_64-unknown-linux-gnu] steps: - uses: actions/checkout@v3 diff --git a/src/domain.rs b/src/domain.rs index d059d5c..2902c40 100644 --- a/src/domain.rs +++ b/src/domain.rs @@ -401,7 +401,7 @@ mod tests { let vals = &["-90.0", "-89.9999999999", "-0.0", "0.0", "90.0"]; for val in vals { - assert!(Latitude::parse(*val).is_ok()); + assert!(Latitude::parse(val).is_ok()); } } @@ -410,7 +410,7 @@ mod tests { let vals = &["-180.0", "-90.00000000001", "90.00000001", "100.0"]; for val in vals { - assert!(Latitude::parse(*val).is_err()); + assert!(Latitude::parse(val).is_err()); } } @@ -447,7 +447,7 @@ mod tests { ]; for val in vals { - assert!(Longitude::parse(*val).is_ok()); + assert!(Longitude::parse(val).is_ok()); } } @@ -456,7 +456,7 @@ mod tests { let vals = &["-180.1", "180.01"]; for val in vals { - assert!(Longitude::parse(*val).is_err()); + assert!(Longitude::parse(val).is_err()); } } diff --git a/src/traits.rs b/src/traits.rs index 62a18d7..2330304 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -50,7 +50,7 @@ mod tests { ]; for (expected, arg) in params.iter() { - let date = NaiveDateTime::parse_from_str(*arg, "%FT%T").unwrap(); + let date = NaiveDateTime::parse_from_str(arg, "%FT%T").unwrap(); assert_eq!(*expected, format!("{:.5}", date.to_julian_date())); } } diff --git a/tests/test_report.rs b/tests/test_report.rs index 14adf36..2ef3c63 100644 --- a/tests/test_report.rs +++ b/tests/test_report.rs @@ -63,13 +63,13 @@ fn test_report_custom_location() { // assert that a report is successfully generated when an arbitrary location is given let mut cmd = get_base_command(); let report_long = cmd - .args(&["--latitude", "51.0", "--longitude", "4.36", "report"]) + .args(["--latitude", "51.0", "--longitude", "4.36", "report"]) .assert(); assert_report(report_long); let mut cmd = get_base_command(); - let report_short = cmd.args(&["-l", "51.0", "-o", "4.36", "report"]).assert(); + let report_short = cmd.args(["-l", "51.0", "-o", "4.36", "report"]).assert(); assert_report(report_short) } @@ -79,7 +79,7 @@ fn test_report_custom_timezone() { // assert that a report is successfully generated when an arbitrary time zone is given let mut cmd = get_base_command(); let report_long = cmd - .args(&[ + .args([ "--latitude", "51.0", "--longitude", @@ -94,7 +94,7 @@ fn test_report_custom_timezone() { let mut cmd = get_base_command(); let report_short = cmd - .args(&[ + .args([ "--latitude", "51.0", "--longitude", @@ -114,7 +114,7 @@ fn test_report_json_output() { // parse the output into a Json Value let json: serde_json::Value = serde_json::from_slice( - &cmd.args(&[ + &cmd.args([ "--date", "2022-06-11", "--time-zone", @@ -151,7 +151,7 @@ fn test_report_json_output() { #[test] fn test_correct_output_small_offset() { let output = get_base_command() - .args(&[ + .args([ "--date", "2022-07-29", "--time-zone", @@ -188,7 +188,7 @@ fn test_correct_output_small_offset() { #[test] fn test_correct_output_large_pos_offset() { let output = get_base_command() - .args(&[ + .args([ "--date", "2022-07-29", "--time-zone",