mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
cp: fix error from large_stack_arrays lint in test
This commit is contained in:
parent
e777db9304
commit
e75abb2dbd
1 changed files with 2 additions and 2 deletions
|
@ -2524,7 +2524,7 @@ fn test_cp_sparse_always_non_empty() {
|
|||
const BUFFER_SIZE: usize = 4096 * 16 + 3;
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
let mut buf: [u8; BUFFER_SIZE] = [0; BUFFER_SIZE];
|
||||
let mut buf = vec![0; BUFFER_SIZE].into_boxed_slice();
|
||||
let blocks_to_touch = [buf.len() / 3, 2 * (buf.len() / 3)];
|
||||
|
||||
for i in blocks_to_touch {
|
||||
|
@ -2540,7 +2540,7 @@ fn test_cp_sparse_always_non_empty() {
|
|||
let touched_block_count =
|
||||
blocks_to_touch.len() as u64 * at.metadata("dst_file_sparse").blksize() / 512;
|
||||
|
||||
assert_eq!(at.read_bytes("dst_file_sparse"), buf);
|
||||
assert_eq!(at.read_bytes("dst_file_sparse").into_boxed_slice(), buf);
|
||||
assert_eq!(at.metadata("dst_file_sparse").blocks(), touched_block_count);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue