From d6331bec1c467d6c786a95b16d6cbe205fa83fdd Mon Sep 17 00:00:00 2001 From: bflatastic Date: Tue, 27 Oct 2026 14:36:12 +0700 Subject: [PATCH] Format: repeat_n in the JSON cap test (clippy manual_repeat_n) --- crates/format/src/unpack.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/format/src/unpack.rs b/crates/format/src/unpack.rs index 2b8652453..d0833ad0f 100644 --- a/crates/format/src/unpack.rs +++ b/crates/format/src/unpack.rs @@ -339,7 +339,7 @@ mod tests { // The cap itself: a quarter of the address space on wasm32, 1 GiB elsewhere. assert_eq!(MAX_JSON, if cfg!(target_arch = "wasm32") { 256 << 20 } else { 1 << 30 }); let mut json = br#"{"format":"vectorcraft","pad":""#.to_vec(); - json.extend(std::iter::repeat(b'x').take(4096)); + json.extend(std::iter::repeat_n(b'x', 4096)); json.extend(br#""}"#); let gz = gzip(&json); // Within the target's cap the file opens, and the JSON reads back whole.