Skip to content

Commit fefc066

Browse files
author
Roland Peelen
committed
🚨 - Cargo FMT
1 parent cad838d commit fefc066

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

src/build/read_compile_state.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,19 @@ pub fn read(build_state: &mut BuildState) -> CompileAssetsState {
9494
.get(&build_state.root_config_name)
9595
.expect("Could not find root package");
9696
if let Some(res_file_path) = res_file_path {
97-
let _ = ast_modules.insert(
98-
res_file_path.to_owned(),
99-
AstModule {
100-
module_name,
101-
package_name: package_name.to_owned(),
102-
namespace: package_namespace.to_owned(),
103-
last_modified: last_modified.to_owned(),
104-
ast_file_path,
105-
is_root: *package_is_root,
106-
suffix: root_package.bsconfig.suffix.to_owned(),
107-
},
108-
);
109-
let _ = ast_rescript_file_locations.insert(res_file_path);
97+
let _ = ast_modules.insert(
98+
res_file_path.to_owned(),
99+
AstModule {
100+
module_name,
101+
package_name: package_name.to_owned(),
102+
namespace: package_namespace.to_owned(),
103+
last_modified: last_modified.to_owned(),
104+
ast_file_path,
105+
is_root: *package_is_root,
106+
suffix: root_package.bsconfig.suffix.to_owned(),
107+
},
108+
);
109+
let _ = ast_rescript_file_locations.insert(res_file_path);
110110
}
111111
}
112112
"cmi" => {

src/watcher.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ async fn async_watch(
178178
match needs_compile_type {
179179
CompileType::Incremental => {
180180
let timing_total = Instant::now();
181-
if build::incremental_build(&mut build_state, None, initial_build, !initial_build).is_ok()
182-
{
183-
if let Some(a) = after_build.clone() { cmd::run(a) }
181+
if build::incremental_build(&mut build_state, None, initial_build, !initial_build).is_ok() {
182+
if let Some(a) = after_build.clone() {
183+
cmd::run(a)
184+
}
184185
let timing_total_elapsed = timing_total.elapsed();
185186
println!(
186187
"\n{}{}Finished {} compilation in {:.2}s\n",
@@ -197,7 +198,9 @@ async fn async_watch(
197198
let timing_total = Instant::now();
198199
build_state = build::initialize_build(None, filter, path).expect("Can't initialize build");
199200
let _ = build::incremental_build(&mut build_state, None, initial_build, false);
200-
if let Some(a) = after_build.clone() { cmd::run(a) }
201+
if let Some(a) = after_build.clone() {
202+
cmd::run(a)
203+
}
201204
let timing_total_elapsed = timing_total.elapsed();
202205
println!(
203206
"\n{}{}Finished compilation in {:.2}s\n",

0 commit comments

Comments
 (0)