Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fzyzcjy committed Nov 5, 2024
1 parent 648c239 commit ffd60af
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions frb_codegen/src/library/commands/fvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ use crate::library::commands::command_runner::call_shell;
use std::path::Path;

pub(crate) fn command_arg_maybe_fvm(pwd: Option<&Path>) -> Option<String> {
if should_use_fvm(pwd) {
Some("fvm".to_owned())
} else {
None
}
should_use_fvm(pwd).then(|| "fvm".to_owned())
}

fn should_use_fvm(pwd: Option<&Path>) -> bool {
Expand Down Expand Up @@ -36,6 +32,7 @@ fn has_fvmrc(pwd: &Path) -> bool {
}
}

#[allow(clippy::vec_init_then_push)]
fn has_fvm_installation() -> bool {
command_run!(call_shell[None, None], "fvm", "--version")
.map_or(false, |res| res.status.success())
Expand Down

0 comments on commit ffd60af

Please sign in to comment.