Skip to content

Commit de8e20a

Browse files
Apply cargo fmt formatting
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 81c16cd commit de8e20a

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

src/interpreter/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,8 +1845,7 @@ impl Interpreter {
18451845
Ok(rv) => {
18461846
let value = rv.value().clone();
18471847
// Resolve the promise - ignore errors (promise might be settled)
1848-
let _ =
1849-
builtins::promise::resolve_promise_value(self, &promise, value);
1848+
let _ = builtins::promise::resolve_promise_value(self, &promise, value);
18501849
}
18511850
Err(e) => {
18521851
// Reject the promise with the error

tests/interpreter/function.rs

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,29 +2308,45 @@ console.log("sum(1,2,3,4,5) =", sum(1, 2, 3, 4, 5));
23082308
#[test]
23092309
fn test_release_mode_minimal_function() {
23102310
// Minimal function declaration with type annotation
2311-
run(&mut super::create_test_runtime(), "function f(x: string): string { return x; } f('test')", None)
2312-
.expect("Basic function should work");
2311+
run(
2312+
&mut super::create_test_runtime(),
2313+
"function f(x: string): string { return x; } f('test')",
2314+
None,
2315+
)
2316+
.expect("Basic function should work");
23132317
}
23142318

23152319
#[test]
23162320
fn test_release_mode_minimal_arrow() {
23172321
// Minimal arrow function with type annotation
2318-
run(&mut super::create_test_runtime(), "const f = (a: number, b: number): number => a + b; f(1, 2)", None)
2319-
.expect("Arrow function should work");
2322+
run(
2323+
&mut super::create_test_runtime(),
2324+
"const f = (a: number, b: number): number => a + b; f(1, 2)",
2325+
None,
2326+
)
2327+
.expect("Arrow function should work");
23202328
}
23212329

23222330
#[test]
23232331
fn test_release_mode_minimal_default_param() {
23242332
// Function with default parameter
2325-
run(&mut super::create_test_runtime(), "function f(x: number = 2): number { return x; } f()", None)
2326-
.expect("Default param should work");
2333+
run(
2334+
&mut super::create_test_runtime(),
2335+
"function f(x: number = 2): number { return x; } f()",
2336+
None,
2337+
)
2338+
.expect("Default param should work");
23272339
}
23282340

23292341
#[test]
23302342
fn test_release_mode_minimal_rest_param() {
23312343
// Function with rest parameter
2332-
run(&mut super::create_test_runtime(), "function f(...args: number[]): number { return args.length; } f(1, 2, 3)", None)
2333-
.expect("Rest param should work");
2344+
run(
2345+
&mut super::create_test_runtime(),
2346+
"function f(...args: number[]): number { return args.length; } f(1, 2, 3)",
2347+
None,
2348+
)
2349+
.expect("Rest param should work");
23342350
}
23352351

23362352
#[test]

0 commit comments

Comments
 (0)