Skip to content

Commit

Permalink
style(util): fix clippy::useless_vec lints (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Jan 21, 2024
1 parent 8365530 commit 526399d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util/src/io/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 526399d

Please sign in to comment.