Skip to content

Commit 56dd428

Browse files
fmt
1 parent 7979578 commit 56dd428

File tree

6 files changed

+1325
-768
lines changed

6 files changed

+1325
-768
lines changed

src/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
//! assert_eq!(joined.as_str(), Some("1-2-3"));
2828
//! ```
2929
30+
use crate::JsString;
3031
use crate::error::JsError;
3132
use crate::gc::{Gc, Guard};
3233
use crate::interpreter::{self, Interpreter};
3334
use crate::prelude::*;
3435
use crate::value::{self, CheapClone, JsObject, JsValue};
35-
use crate::JsString;
3636

3737
// ═══════════════════════════════════════════════════════════════════════════════
3838
// Guard Creation

src/compiler/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,11 @@ impl Compiler {
311311

312312
// Start from the current (innermost) context and work backwards
313313
// Set continue target for the current loop
314-
let current_continue_scope_depth = self.loop_stack.get(len - 1).map(|ctx| ctx.continue_scope_depth).unwrap_or(0);
314+
let current_continue_scope_depth = self
315+
.loop_stack
316+
.get(len - 1)
317+
.map(|ctx| ctx.continue_scope_depth)
318+
.unwrap_or(0);
315319
if let Some(ctx) = self.loop_stack.get_mut(len - 1) {
316320
ctx.continue_target = Some(target);
317321
all_pending_jumps.append(&mut ctx.continue_jumps);
@@ -337,7 +341,8 @@ impl Compiler {
337341
// Patch all pending continue jumps (both target address and scope_depth)
338342
for jump in &all_pending_jumps {
339343
self.builder.patch_jump_to(*jump, target as JumpTarget);
340-
self.builder.patch_scope_depth(*jump, current_continue_scope_depth as u32);
344+
self.builder
345+
.patch_scope_depth(*jump, current_continue_scope_depth as u32);
341346
}
342347
}
343348

0 commit comments

Comments
 (0)