Skip to content

Commit

Permalink
Rename argument to be generic and fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sporkmonger committed Aug 24, 2023
1 parent ff54d30 commit 56e4e1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fn install_wasm32_wasi_target() -> Result<(), BuildError> {
pub(crate) fn build_plugin(
path: impl AsRef<Path>,
output: impl AsRef<Path>,
additional_args: &Vec<String>,
additional_args: &[String],
) -> Result<(), BuildError> {
// TODO: install wasm32-wasi target if missing
let adapter_bytes = include_bytes!("../adapter/wasi_snapshot_preview1.reactor.wasm");
Expand Down
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ enum Command {
#[arg(short, long, value_name = "FILE")]
output: Option<PathBuf>,

/// Additional arguments passed through to the compiler.
#[arg(last = true)]
cargo_args: Vec<String>,
compiler_args: Vec<String>,
},
}

Expand Down Expand Up @@ -291,7 +292,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
Command::Build {
path,
output,
cargo_args,
compiler_args,
} => {
let current_dir = std::env::current_dir()?;
let path = path.clone().unwrap_or(current_dir.clone());
Expand All @@ -303,7 +304,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
if output.is_dir() {
output = output.join(wasm_filename);
}
crate::build::build_plugin(&path, output, cargo_args)?;
crate::build::build_plugin(&path, output, compiler_args)?;
}
}

Expand Down

0 comments on commit 56e4e1c

Please sign in to comment.