Skip to content

Commit

Permalink
chore: remove useless Option (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunchen authored Jul 25, 2024
1 parent 7b1686d commit 3b3a34b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/moon/src/cli/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub fn run_run_internal(cli: &UniversalFlags, cmd: RunSubcommand) -> anyhow::Res
trace::open("trace.json").context("failed to open `trace.json`")?;
}

let result = entry::run_run(Some(&package_path), &moonc_opt, &moonbuild_opt, &module);
let result = entry::run_run(&package_path, &moonc_opt, &moonbuild_opt, &module);
if trace_flag {
trace::close();
}
Expand Down
3 changes: 1 addition & 2 deletions crates/moonbuild/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,14 @@ pub fn run_build(
}

pub fn run_run(
package_path: Option<&String>,
package_path: &str,
moonc_opt: &MooncOpt,
moonbuild_opt: &MoonbuildOpt,
module: &ModuleDB,
) -> anyhow::Result<i32> {
run_build(moonc_opt, moonbuild_opt, module)?;
let (source_dir, target_dir) = (&moonbuild_opt.source_dir, &moonbuild_opt.target_dir);
let package_path = package_path
.unwrap()
.trim_start_matches("./")
.trim_start_matches(".\\")
.trim_end_matches(is_slash);
Expand Down

0 comments on commit 3b3a34b

Please sign in to comment.