From 526399d273f4d7287ed5f0cad75fde6de834591c Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Sun, 21 Jan 2024 11:16:17 -0800 Subject: [PATCH] style(util): fix `clippy::useless_vec` lints (#468) --- util/src/io/cursor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/src/io/cursor.rs b/util/src/io/cursor.rs index 1bdf8eb9..165c4a1b 100644 --- a/util/src/io/cursor.rs +++ b/util/src/io/cursor.rs @@ -410,7 +410,7 @@ mod tests { #[test] #[cfg(feature = "alloc")] fn test_slice_reader() { - let in_buf = vec![0, 1, 2, 3, 4, 5, 6, 7]; + let in_buf = [0, 1, 2, 3, 4, 5, 6, 7]; let reader = &mut &in_buf[..]; let mut buf = []; assert_eq!(reader.read(&mut buf).unwrap(), 0); @@ -433,7 +433,7 @@ mod tests { #[test] #[cfg(feature = "alloc")] fn test_read_exact() { - let in_buf = vec![0, 1, 2, 3, 4, 5, 6, 7]; + let in_buf = [0, 1, 2, 3, 4, 5, 6, 7]; let reader = &mut &in_buf[..]; let mut buf = []; reader @@ -460,7 +460,7 @@ mod tests { #[test] #[cfg(feature = "alloc")] fn test_buf_reader() { - let in_buf = vec![0, 1, 2, 3, 4, 5, 6, 7]; + let in_buf = [0, 1, 2, 3, 4, 5, 6, 7]; let mut reader = Cursor::new(&in_buf[..]); let mut buf = []; assert_eq!(reader.read(&mut buf).unwrap(), 0);