From a028c7ddde8781895abe28ea71c90e6db58fa77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Sat, 15 Aug 2026 00:27:03 +0200 Subject: [PATCH] style(array): restore rustfmt on the files #8090 landed unformatted `cargo fmt --all -- --check` is red on main at 0d7fe21b0, in exactly the two files that commit touched: the `array::header` re-export list in `array/mod.rs` and the import block in `typed_array_receiver_tests.rs`. `lint` is a required context and #8087 had just restored it, so this put it straight back to red for every open PR. Formatting only -- no code, no re-export set change, `cargo fmt --all -- --check` clean afterwards. My fault at merge time: I ran the four static gates (file size, GC store-site inventory, raw-handle ratchet, addr-class inventory) on the landing tree and did not run `cargo fmt --check`, which is the one gate that catches this. --- crates/perry-runtime/src/array/mod.rs | 7 +++---- .../src/array/typed_array_receiver_tests.rs | 13 +++++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/perry-runtime/src/array/mod.rs b/crates/perry-runtime/src/array/mod.rs index d820e6e192..49840a1adc 100644 --- a/crates/perry-runtime/src/array/mod.rs +++ b/crates/perry-runtime/src/array/mod.rs @@ -202,18 +202,17 @@ pub(crate) use self::alloc::{js_array_from_arraylike, js_array_from_string_codep pub(crate) use self::flat_clone::{dense_spread_copy, dense_spread_source, flattenable_array_ptr}; pub(crate) use self::header::{ array_byte_size, array_is_frozen, array_is_sealed_or_no_extend, array_named_property_delete, - array_receiver_addr, array_named_property_get, array_named_property_get_by_name, array_named_property_has, array_named_property_names, array_named_property_set, array_numeric_raw_f64_get, array_numeric_raw_f64_push_inbounds, array_numeric_raw_f64_set_inbounds, array_object_flags, - array_object_flags_from_tag, array_ptr_as_proxy, array_receiver_gc_tag, + array_object_flags_from_tag, array_ptr_as_proxy, array_receiver_addr, array_receiver_gc_tag, canonicalize_array_numeric_store_value, clean_arr_ptr, clean_arr_ptr_mut, clear_array_numeric_layout, clear_array_numeric_layout_ptr, gc_element_slot_range, mark_array_layout_unknown, mark_array_raw_f64_holes_fresh, normalize_array_receiver, note_array_slot, note_array_slot_layout_only, rebuild_array_layout, rebuild_array_layout_exact, refresh_array_numeric_layout, replay_array_growth_write_barriers, set_array_numeric_layout, - store_array_slot, transfer_array_numeric_layout, typed_array_receiver, - value_bits_to_number, NumericArrayLayout, MIN_ARRAY_CAPACITY, + store_array_slot, transfer_array_numeric_layout, typed_array_receiver, value_bits_to_number, + NumericArrayLayout, MIN_ARRAY_CAPACITY, }; // Sole caller is the regex-engine-gated `regex::exec_array`, so the helper and diff --git a/crates/perry-runtime/src/array/typed_array_receiver_tests.rs b/crates/perry-runtime/src/array/typed_array_receiver_tests.rs index 72e5771517..808600ef98 100644 --- a/crates/perry-runtime/src/array/typed_array_receiver_tests.rs +++ b/crates/perry-runtime/src/array/typed_array_receiver_tests.rs @@ -41,9 +41,11 @@ //! ordinary path. use super::*; -use crate::array::{js_array_alloc, js_array_copy_within, js_array_fill, js_array_fill_range, - js_array_push_f64, js_array_reverse}; -use crate::typedarray::{TypedArrayHeader, js_typed_array_get, js_typed_array_set}; +use crate::array::{ + js_array_alloc, js_array_copy_within, js_array_fill, js_array_fill_range, js_array_push_f64, + js_array_reverse, +}; +use crate::typedarray::{js_typed_array_get, js_typed_array_set, TypedArrayHeader}; /// `Uint16Array` (kind 4 per `elem_size_for_kind`) — 2-byte elements, so a /// value above 0xFFFF proves the store went through the per-kind accessor. @@ -141,7 +143,10 @@ fn js_array_copy_within_copies_typed_elements() { // `c.copyWithin(0, 2)` — no end argument (has_end == 0 means "to length"). let ta = typed(UINT16, &[1.0, 2.0, 3.0, 4.0]); let out = js_array_copy_within(as_array(ta), 0.0, 2.0, 0, 0.0); - assert!(!out.is_null(), "copyWithin must return its receiver, not null"); + assert!( + !out.is_null(), + "copyWithin must return its receiver, not null" + ); assert_eq!(read_back(ta, 4), vec![3.0, 4.0, 3.0, 4.0]); // Negative target/start, and an out-of-range end that clamps to length.