diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2023-01-27 10:43:16 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-27 10:43:16 -0500 |
| commit | f5840bdcd360ec0bac2501f333e58e25742b1537 (patch) | |
| tree | 7eb0818d2cafa0f6824e81b6ed2cfb609830971e /cli/tools/repl | |
| parent | 1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff) | |
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tools/repl')
| -rw-r--r-- | cli/tools/repl/editor.rs | 5 | ||||
| -rw-r--r-- | cli/tools/repl/mod.rs | 13 | ||||
| -rw-r--r-- | cli/tools/repl/session.rs | 5 |
3 files changed, 8 insertions, 15 deletions
diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs index f8302367a..c9f019305 100644 --- a/cli/tools/repl/editor.rs +++ b/cli/tools/repl/editor.rs @@ -277,8 +277,7 @@ fn validate(input: &str) -> ValidationResult { | (Some(Token::DollarLBrace), Token::RBrace) => {} (Some(left), _) => { return ValidationResult::Invalid(Some(format!( - "Mismatched pairs: {:?} is not properly closed", - left + "Mismatched pairs: {left:?} is not properly closed" ))) } (None, _) => { @@ -460,7 +459,7 @@ impl ReplEditor { } self.errored_on_history_save.store(true, Relaxed); - eprintln!("Unable to save history file: {}", e); + eprintln!("Unable to save history file: {e}"); } } 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; } } diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs index cb7d18c46..e288ab0e6 100644 --- a/cli/tools/repl/session.rs +++ b/cli/tools/repl/session.rs @@ -419,10 +419,7 @@ impl ReplSession { .text; let value = self - .evaluate_expression(&format!( - "'use strict'; void 0;\n{}", - transpiled_src - )) + .evaluate_expression(&format!("'use strict'; void 0;\n{transpiled_src}")) .await?; Ok(TsEvaluateResponse { |
