summaryrefslogtreecommitdiff
path: root/cli/tools/repl/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/repl/mod.rs')
-rw-r--r--cli/tools/repl/mod.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs
index 780f16a6a..a9cb0132b 100644
--- a/cli/tools/repl/mod.rs
+++ b/cli/tools/repl/mod.rs
@@ -112,14 +112,11 @@ pub async fn run(flags: Flags, repl_flags: ReplFlags) -> Result<i32, AnyError> {
.await;
// only output errors
if let EvaluationOutput::Error(error_text) = output {
- println!(
- "Error in --eval-file file \"{}\": {}",
- eval_file, error_text
- );
+ println!("Error in --eval-file file \"{eval_file}\": {error_text}");
}
}
Err(e) => {
- println!("Error in --eval-file file \"{}\": {}", eval_file, e);
+ println!("Error in --eval-file file \"{eval_file}\": {e}");
}
}
}
@@ -129,7 +126,7 @@ pub async fn run(flags: Flags, repl_flags: ReplFlags) -> Result<i32, AnyError> {
let output = repl_session.evaluate_line_and_get_output(&eval).await;
// only output errors
if let EvaluationOutput::Error(error_text) = output {
- println!("Error in --eval flag: {}", error_text);
+ println!("Error in --eval flag: {error_text}");
}
}
@@ -166,7 +163,7 @@ pub async fn run(flags: Flags, repl_flags: ReplFlags) -> Result<i32, AnyError> {
break;
}
- println!("{}", output);
+ println!("{output}");
}
Err(ReadlineError::Interrupted) => {
if editor.should_exit_on_interrupt() {
@@ -180,7 +177,7 @@ pub async fn run(flags: Flags, repl_flags: ReplFlags) -> Result<i32, AnyError> {
break;
}
Err(err) => {
- println!("Error: {:?}", err);
+ println!("Error: {err:?}");
break;
}
}