Skip to content

Commit

Permalink
Use if expression
Browse files Browse the repository at this point in the history
  • Loading branch information
lgxbslgx committed Sep 10, 2024
1 parent a732800 commit e2dc183
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions crates/moon/src/cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,18 @@ fn run_build_internal(
trace::open("trace.json").context("failed to open `trace.json`")?;
}

let res;
if cmd.watch {
let res = if cmd.watch {
let reg_cfg = RegistryConfig::load();
res = watching(
watching(
&moonc_opt,
&moonbuild_opt,
&reg_cfg,
&module,
original_target_dir,
);
)
} else {
res = entry::run_build(&moonc_opt, &moonbuild_opt, &module);
}
entry::run_build(&moonc_opt, &moonbuild_opt, &module)
};

if trace_flag {
trace::close();
Expand Down

0 comments on commit e2dc183

Please sign in to comment.