aboutsummaryrefslogtreecommitdiff
path: root/tests/test_bytes.rs
diff options
context:
space:
mode:
authorGravatar Rob Ede <robjtede@icloud.com> 2022-01-24 08:58:05 +0000
committerGravatar GitHub <noreply@github.com> 2022-01-24 09:58:05 +0100
commit0e3b2466f199375031006857164fbf70e3ea479f (patch)
treedb22384c238a578fde1c7f4572338fa7744b6876 /tests/test_bytes.rs
parent68afb40df9ea2e61a93d0e26f6f8a9f231979452 (diff)
downloadbytes-0e3b2466f199375031006857164fbf70e3ea479f.tar.gz
bytes-0e3b2466f199375031006857164fbf70e3ea479f.tar.zst
bytes-0e3b2466f199375031006857164fbf70e3ea479f.zip
Address various clippy warnings (#528)
Diffstat (limited to 'tests/test_bytes.rs')
-rw-r--r--tests/test_bytes.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_bytes.rs b/tests/test_bytes.rs
index f0cae99..3819b9f 100644
--- a/tests/test_bytes.rs
+++ b/tests/test_bytes.rs
@@ -4,8 +4,8 @@ use bytes::{Buf, BufMut, Bytes, BytesMut};
use std::usize;
-const LONG: &'static [u8] = b"mary had a little lamb, little lamb, little lamb";
-const SHORT: &'static [u8] = b"hello world";
+const LONG: &[u8] = b"mary had a little lamb, little lamb, little lamb";
+const SHORT: &[u8] = b"hello world";
fn is_sync<T: Sync>() {}
fn is_send<T: Send>() {}
@@ -874,7 +874,7 @@ fn from_iter_no_size_hint() {
fn test_slice_ref(bytes: &Bytes, start: usize, end: usize, expected: &[u8]) {
let slice = &(bytes.as_ref()[start..end]);
- let sub = bytes.slice_ref(&slice);
+ let sub = bytes.slice_ref(slice);
assert_eq!(&sub[..], expected);
}
@@ -894,7 +894,7 @@ fn slice_ref_empty() {
let bytes = Bytes::from(&b""[..]);
let slice = &(bytes.as_ref()[0..0]);
- let sub = bytes.slice_ref(&slice);
+ let sub = bytes.slice_ref(slice);
assert_eq!(&sub[..], b"");
}