Skip to content

Commit f4e4777

Browse files
committed
fix(ci): cargo fmt drift across 4 files + version bump (v0.5.861)
v0.5.858/859 left fmt drift in: - crates/perry-codegen/src/expr.rs:6215 - crates/perry-hir/src/lower/expr_member.rs:564 - crates/perry-hir/src/lower.rs:7647 - crates/perry-runtime/src/regex.rs:397 Also bumps Cargo.toml + CLAUDE.md from 0.5.859 → 0.5.861 (v0.5.860 tag bumped tag only; version files were skipped due to linter race). Pure formatting + metadata.
1 parent 7e6629c commit f4e4777

4 files changed

Lines changed: 10 additions & 21 deletions

File tree

crates/perry-codegen/src/expr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6215,8 +6215,7 @@ pub(crate) fn lower_expr(ctx: &mut FnCtx<'_>, expr: &Expr) -> Result<String> {
62156215
// Materialize raw array — same path, but all elements are
62166216
// String literals (built at HIR lowering from each quasi's
62176217
// `.raw` text), so build a Vec<Expr::String> on the fly.
6218-
let raw_exprs: Vec<Expr> =
6219-
raw.iter().map(|s| Expr::String(s.clone())).collect();
6218+
let raw_exprs: Vec<Expr> = raw.iter().map(|s| Expr::String(s.clone())).collect();
62206219
let raw_box = lower_array_literal(ctx, &raw_exprs)?;
62216220
let blk = ctx.block();
62226221
let cooked_handle = unbox_to_i64(blk, &cooked_box);

crates/perry-hir/src/lower.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7647,13 +7647,13 @@ pub(crate) fn lower_expr(ctx: &mut LoweringContext, expr: &ast::Expr) -> Result<
76477647
// read that returns undefined.
76487648
if (prop_name == "groups" || prop_name == "index")
76497649
&& match member.obj.as_ref() {
7650-
ast::Expr::Ident(ident) => ctx
7651-
.regex_exec_locals
7652-
.contains(&ident.sym.to_string()),
7650+
ast::Expr::Ident(ident) => {
7651+
ctx.regex_exec_locals.contains(&ident.sym.to_string())
7652+
}
76537653
ast::Expr::TsNonNull(nn) => match nn.expr.as_ref() {
7654-
ast::Expr::Ident(ident) => ctx
7655-
.regex_exec_locals
7656-
.contains(&ident.sym.to_string()),
7654+
ast::Expr::Ident(ident) => {
7655+
ctx.regex_exec_locals.contains(&ident.sym.to_string())
7656+
}
76577657
_ => false,
76587658
},
76597659
_ => false,

crates/perry-hir/src/lower/expr_member.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,8 @@ pub(super) fn lower_member(ctx: &mut LoweringContext, member: &ast::MemberExpr)
564564
if let ast::Expr::Ident(ident) = member.obj.as_ref() {
565565
let recv_ty = ctx.lookup_local_type(ident.sym.as_ref());
566566
let is_array = match recv_ty {
567-
Some(perry_types::Type::Array(_)) | Some(perry_types::Type::Tuple(_)) => {
568-
true
569-
}
570-
Some(perry_types::Type::Named(n))
571-
if n == "TemplateStringsArray" =>
572-
{
573-
true
574-
}
567+
Some(perry_types::Type::Array(_)) | Some(perry_types::Type::Tuple(_)) => true,
568+
Some(perry_types::Type::Named(n)) if n == "TemplateStringsArray" => true,
575569
_ => false,
576570
};
577571
if is_array {

crates/perry-runtime/src/regex.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,7 @@ pub extern "C" fn js_string_match(
397397
name.as_ptr(),
398398
name.len() as u32,
399399
);
400-
crate::object::js_object_set_field_by_name(
401-
groups_obj,
402-
key_ptr,
403-
val,
404-
);
400+
crate::object::js_object_set_field_by_name(groups_obj, key_ptr, val);
405401
}
406402
LAST_EXEC_GROUPS.with(|g| *g.borrow_mut() = groups_obj);
407403
} else {

0 commit comments

Comments
 (0)