From d3b02b8c5b6d6e9247a584080e4dc349505233e9 Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Wed, 5 Feb 2025 19:51:54 -0500 Subject: [PATCH] Upgrade rust toolchain to 1.84.1 (#5211) * Upgrade rust toolchain to 1.84.1 * Fix lint warnings --- src/wasm-lib/kcl/src/execution/exec_ast.rs | 2 +- src/wasm-lib/kcl/src/execution/mod.rs | 4 ++-- src/wasm-lib/kcl/src/std/array.rs | 8 ++++---- src/wasm-lib/kcl/src/std/patterns.rs | 8 ++++---- src/wasm-lib/rust-toolchain.toml | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/wasm-lib/kcl/src/execution/exec_ast.rs b/src/wasm-lib/kcl/src/execution/exec_ast.rs index 0d82ce7f3..213f5dfd1 100644 --- a/src/wasm-lib/kcl/src/execution/exec_ast.rs +++ b/src/wasm-lib/kcl/src/execution/exec_ast.rs @@ -1609,7 +1609,7 @@ pub struct FunctionParam<'a> { pub ctx: ExecutorContext, } -impl<'a> FunctionParam<'a> { +impl FunctionParam<'_> { pub async fn call(&self, exec_state: &mut ExecState, args: Vec) -> Result, KclError> { if let Some(inner) = self.inner { inner( diff --git a/src/wasm-lib/kcl/src/execution/mod.rs b/src/wasm-lib/kcl/src/execution/mod.rs index 129789c77..54d867b5a 100644 --- a/src/wasm-lib/kcl/src/execution/mod.rs +++ b/src/wasm-lib/kcl/src/execution/mod.rs @@ -684,9 +684,9 @@ impl ExecutorContext { /// Execute an AST's program and build auxiliary outputs like the artifact /// graph. - async fn execute_and_build_graph<'a>( + async fn execute_and_build_graph( &self, - program: NodeRef<'a, crate::parsing::ast::types::Program>, + program: NodeRef<'_, crate::parsing::ast::types::Program>, exec_state: &mut ExecState, ) -> Result, KclError> { // Don't early return! We need to build other outputs regardless of diff --git a/src/wasm-lib/kcl/src/std/array.rs b/src/wasm-lib/kcl/src/std/array.rs index ffa6995fa..cc1cd6883 100644 --- a/src/wasm-lib/kcl/src/std/array.rs +++ b/src/wasm-lib/kcl/src/std/array.rs @@ -72,9 +72,9 @@ async fn inner_map<'a>( Ok(new_array) } -async fn call_map_closure<'a>( +async fn call_map_closure( input: KclValue, - map_fn: &FunctionParam<'a>, + map_fn: &FunctionParam<'_>, source_range: SourceRange, exec_state: &mut ExecState, ) -> Result { @@ -199,10 +199,10 @@ async fn inner_reduce<'a>( Ok(reduced) } -async fn call_reduce_closure<'a>( +async fn call_reduce_closure( elem: KclValue, start: KclValue, - reduce_fn: &FunctionParam<'a>, + reduce_fn: &FunctionParam<'_>, source_range: SourceRange, exec_state: &mut ExecState, ) -> Result { diff --git a/src/wasm-lib/kcl/src/std/patterns.rs b/src/wasm-lib/kcl/src/std/patterns.rs index 993d156e7..f3313f808 100644 --- a/src/wasm-lib/kcl/src/std/patterns.rs +++ b/src/wasm-lib/kcl/src/std/patterns.rs @@ -350,11 +350,11 @@ async fn inner_pattern_transform_2d<'a>( execute_pattern_transform(transform, solid_set, exec_state, args).await } -async fn execute_pattern_transform<'a, T: GeometryTrait>( +async fn execute_pattern_transform( transforms: Vec>, geo_set: T::Set, exec_state: &mut ExecState, - args: &'a Args, + args: &Args, ) -> Result, KclError> { // Flush the batch for our fillets/chamfers if there are any. // If we do not flush these, then you won't be able to pattern something with fillets. @@ -414,9 +414,9 @@ async fn send_pattern_transform( Ok(geometries) } -async fn make_transform<'a, T: GeometryTrait>( +async fn make_transform( i: u32, - transform_function: &FunctionParam<'a>, + transform_function: &FunctionParam<'_>, source_range: SourceRange, exec_state: &mut ExecState, ) -> Result, KclError> { diff --git a/src/wasm-lib/rust-toolchain.toml b/src/wasm-lib/rust-toolchain.toml index d8dbc115a..cd04301d0 100644 --- a/src/wasm-lib/rust-toolchain.toml +++ b/src/wasm-lib/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.83.0" +channel = "1.84.1" components = ["clippy", "rustfmt"]