Skip to content

Commit 6fc43ee

Browse files
committed
review feedback
1 parent c4802ed commit 6fc43ee

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

cmd/soroban-cli/src/commands/contract/build.rs

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,14 @@ impl Cmd {
205205
return Err(Error::Exit(status));
206206
}
207207

208-
self.build_package(&print, &p, target_dir, &wasm_target)?;
208+
self.post_build_steps(&print, &p, target_dir, &wasm_target)?;
209209
}
210210
}
211211

212212
Ok(())
213213
}
214214

215-
fn build_package(
215+
fn post_build_steps(
216216
&self,
217217
print: &Print,
218218
package: &Package,
@@ -245,16 +245,16 @@ impl Cmd {
245245
wasm: final_path.clone(),
246246
};
247247
wasm_args.optimize(&optimized_file_path)?;
248-
optimized_path = Some(optimized_file_path);
248+
Some(optimized_file_path)
249249
}
250250
#[cfg(not(feature = "additional-libs"))]
251251
{
252-
print.warnln(
253-
"Must install with \"opt\" feature (e.g. `cargo install --locked soroban-cli --features opt`) to use --optimize",
254-
);
252+
print.warnln("Must install with \"opt\" feature (e.g. `cargo install --locked soroban-cli --features opt`) to use --optimize",);
253+
None
255254
}
256-
}
257-
255+
} else {
256+
None
257+
};
258258
Self::print_build_summary(print, &final_path, optimized_path.as_ref())?;
259259

260260
Ok(())
@@ -363,11 +363,7 @@ impl Cmd {
363363
target_file_path: &PathBuf,
364364
optimized_path: Option<&PathBuf>,
365365
) -> Result<(), Error> {
366-
if optimized_path.is_some() {
367-
print.infoln("Build Summary (Optimized):");
368-
} else {
369-
print.infoln("Build Summary:");
370-
}
366+
print.infoln("Build Summary:");
371367

372368
Self::print_file_summary(print, "Wasm File", target_file_path, false, None)?;
373369

cmd/soroban-cli/src/signer/keyring.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl StellarEntry {
4343
self.name
4444
));
4545
self.set_seed_phrase(seed_phrase)?;
46-
};
46+
}
4747
Ok(())
4848
}
4949

0 commit comments

Comments
 (0)