From e21c149b74208018053c3e3585cdf109db585491 Mon Sep 17 00:00:00 2001 From: Sagie Gur-Ari Date: Fri, 15 Dec 2023 21:17:43 +0200 Subject: [PATCH] Build (#1000) build --- .github/workflows/ci.yml | 2 +- src/lib/installer/crate_version_check_test.rs | 4 +--- src/lib/test/mod.rs | 12 ++---------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb595db1b..a554ceb8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - rust: [stable, beta, nightly] + rust: [stable, beta, nightly, 1.73.0] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - name: Checkout diff --git a/src/lib/installer/crate_version_check_test.rs b/src/lib/installer/crate_version_check_test.rs index 169924a8b..3a83cf2b8 100644 --- a/src/lib/installer/crate_version_check_test.rs +++ b/src/lib/installer/crate_version_check_test.rs @@ -1,8 +1,6 @@ use super::*; -use crate::test; use ci_info; use envmnt; -use rust_info::types::RustChannel; #[test] #[ignore] @@ -132,7 +130,7 @@ fn get_crate_version_from_info_valid() { #[test] fn get_crate_version_for_rustup_component() { - if (test::is_linux() && test::is_rust_channel(RustChannel::Stable)) || !ci_info::is_ci() { + if !ci_info::is_ci() { let mut version = get_crate_version("rustfmt", None); assert!(version.is_none()); diff --git a/src/lib/test/mod.rs b/src/lib/test/mod.rs index 77e3002c0..23cc4d7a3 100755 --- a/src/lib/test/mod.rs +++ b/src/lib/test/mod.rs @@ -23,21 +23,13 @@ pub(crate) fn on_test_startup() { pub(crate) fn is_linux() -> bool { on_test_startup(); - if cfg!(target_os = "linux") { - true - } else { - false - } + cfg!(target_os = "linux") } pub(crate) fn is_windows() -> bool { on_test_startup(); - if cfg!(windows) { - true - } else { - false - } + cfg!(windows) } pub(crate) fn is_rust_channel(rust_channel: RustChannel) -> bool {