Tweak comments and factoring

This commit is contained in:
Brian Carroll 2023-09-10 11:28:29 +01:00
parent 034482101f
commit ead3c33eb8
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
2 changed files with 16 additions and 11 deletions

View file

@ -55,8 +55,6 @@ pub fn main() -> i32 {
arena.reset();
match repl_state.step(&arena, &line, target_info, DEFAULT_PALETTE) {
// If there was no output, don't print a blank line!
// (This happens for something like a type annotation.)
ReplAction::Eval {
opt_mono,
problems,
@ -64,6 +62,8 @@ pub fn main() -> i32 {
} => {
let output =
evaluate(opt_mono, problems, opt_var_name, &target, dimensions);
// If there was no output, don't print a blank line!
// (This happens for something like a type annotation.)
if !output.is_empty() {
println!("{output}");
}