Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
sagiegurari committed Dec 15, 2023
1 parent 3aedfba commit 3f71d8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/lib/installer/crate_version_check_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fn get_crate_version_from_info_valid() {

#[test]
fn get_crate_version_for_rustup_component() {
if (!ci_info::is_ci() {
if (!ci_info::is_ci()) {

Check failure on line 135 in src/lib/installer/crate_version_check_test.rs

View workflow job for this annotation

GitHub Actions / CI (1.73.0, ubuntu-latest)

unnecessary parentheses around `if` condition
let mut version = get_crate_version("rustfmt", None);
assert!(version.is_none());

Expand Down
12 changes: 2 additions & 10 deletions src/lib/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3f71d8d

Please sign in to comment.