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 /core/examples | |
parent | 1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff) |
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'core/examples')
-rw-r--r-- | core/examples/eval_js_value.rs | 6 | ||||
-rw-r--r-- | core/examples/fs_module_loader.rs | 2 | ||||
-rw-r--r-- | core/examples/schedule_task.rs | 2 | ||||
-rw-r--r-- | core/examples/ts_module_loader.rs | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/core/examples/eval_js_value.rs b/core/examples/eval_js_value.rs index 7bb954371..6990abb85 100644 --- a/core/examples/eval_js_value.rs +++ b/core/examples/eval_js_value.rs @@ -18,7 +18,7 @@ fn main() { let output: serde_json::Value = eval(&mut runtime, code).expect("Eval failed"); - println!("Output: {:?}", output); + println!("Output: {output:?}"); let expected_output = serde_json::json!(10); assert_eq!(expected_output, output); @@ -40,9 +40,9 @@ fn eval( match deserialized_value { Ok(value) => Ok(value), - Err(err) => Err(format!("Cannot deserialize value: {:?}", err)), + Err(err) => Err(format!("Cannot deserialize value: {err:?}")), } } - Err(err) => Err(format!("Evaling error: {:?}", err)), + Err(err) => Err(format!("Evaling error: {err:?}")), } } diff --git a/core/examples/fs_module_loader.rs b/core/examples/fs_module_loader.rs index 620204c60..a8d33e104 100644 --- a/core/examples/fs_module_loader.rs +++ b/core/examples/fs_module_loader.rs @@ -13,7 +13,7 @@ fn main() -> Result<(), Error> { std::process::exit(1); } let main_url = &args[1]; - println!("Run {}", main_url); + println!("Run {main_url}"); let mut js_runtime = JsRuntime::new(RuntimeOptions { module_loader: Some(Rc::new(FsModuleLoader)), diff --git a/core/examples/schedule_task.rs b/core/examples/schedule_task.rs index 6a61619d8..56c8f6dd6 100644 --- a/core/examples/schedule_task.rs +++ b/core/examples/schedule_task.rs @@ -65,7 +65,7 @@ fn main() { #[op] fn op_schedule_task(state: &mut OpState, i: u8) -> Result<(), Error> { let tx = state.borrow_mut::<mpsc::UnboundedSender<Task>>(); - tx.unbounded_send(Box::new(move || println!("Hello, world! x{}", i))) + tx.unbounded_send(Box::new(move || println!("Hello, world! x{i}"))) .expect("unbounded_send failed"); Ok(()) } diff --git a/core/examples/ts_module_loader.rs b/core/examples/ts_module_loader.rs index c78c1f868..82a3c1079 100644 --- a/core/examples/ts_module_loader.rs +++ b/core/examples/ts_module_loader.rs @@ -99,7 +99,7 @@ fn main() -> Result<(), Error> { std::process::exit(1); } let main_url = &args[1]; - println!("Run {}", main_url); + println!("Run {main_url}"); let mut js_runtime = JsRuntime::new(RuntimeOptions { module_loader: Some(Rc::new(TypescriptModuleLoader)), |