Format: repeat_n in the JSON cap test (clippy manual_repeat_n)

This commit is contained in:
bflatastic
2026-10-27 14:36:12 +07:00
parent 36cc081316
commit d6331bec1c
+1 -1
View File
@@ -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.