Skip to content

Commit

Permalink
chore: remove unused fns
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanccn committed Apr 4, 2024
1 parent 6aa164f commit d622834
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
16 changes: 7 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
pub mod cli;
pub mod package_json;
pub mod run;
pub mod suggest;
mod cli;
mod package_json;
mod run;
mod suggest;

use clap::Parser as _;
use color_eyre::eyre::Result;
use std::env;

pub use cli::get_level;

use crate::cli::{Cli, NrxCli};
use clap::Parser as _;

use color_eyre::eyre::Result;
use cli::get_level;

fn main() -> Result<()> {
color_eyre::install()?;
Expand Down
3 changes: 1 addition & 2 deletions src/run/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ mod script;
mod util;

pub use exec::run_exec;
pub use script::{run_script, ScriptType};
pub use util::has_exec;
pub use script::run_script;
8 changes: 0 additions & 8 deletions src/run/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ pub fn make_patched_path(package_path: &Path) -> Result<OsString> {
Ok(env::join_paths(make_patched_paths(package_path))?)
}

#[must_use]
pub fn has_exec(package_path: &Path, bin: &str) -> bool {
make_patched_paths(package_path)
.into_iter()
.map(|p| p.join(bin))
.any(|p| p.is_file())
}

#[cfg(unix)]
#[allow(clippy::unnecessary_wraps)]
#[inline]
Expand Down

0 comments on commit d622834

Please sign in to comment.