Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchalmers committed Dec 3, 2024
1 parent 74e91db commit fb66591
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/wasm-lib/kcl/src/ast/types/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,15 @@ impl Node<CallExpressionKw> {
let source_range = SourceRange::from(arg_expr.clone());
let metadata = Metadata { source_range };
let value = ctx
.execute_expr(&arg_expr, exec_state, &metadata, StatementKind::Expression)
.execute_expr(arg_expr, exec_state, &metadata, StatementKind::Expression)
.await?;
Some(Arg::new(value, source_range))
} else {
None
};

let args = crate::std::Args::new_kw(fn_args, unlabeled, self.into(), ctx.clone());
match ctx.stdlib.get_either(&fn_name) {
match ctx.stdlib.get_either(fn_name) {
FunctionKind::Core(func) => {
// Attempt to call the function.
let mut result = func.std_lib_fn()(exec_state, args).await?;
Expand Down Expand Up @@ -481,7 +481,7 @@ impl Node<CallExpression> {
fn_args.push(arg);
}

match ctx.stdlib.get_either(&fn_name) {
match ctx.stdlib.get_either(fn_name) {
FunctionKind::Core(func) => {
// Attempt to call the function.
let args = crate::std::Args::new(fn_args, self.into(), ctx.clone());
Expand Down
4 changes: 2 additions & 2 deletions src/wasm-lib/kcl/src/std/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ impl Args {
}));
};
T::from_kcl_val(&arg.value).ok_or_else(|| {
return KclError::Semantic(KclErrorDetails {
KclError::Semantic(KclErrorDetails {
source_ranges: arg.source_ranges(),
message: format!(
"Expected a {} but found {}",
type_name::<T>(),
arg.value.human_friendly_type()
),
});
})
})
}

Expand Down

0 comments on commit fb66591

Please sign in to comment.