mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-03 04:47:39 +03:00
Clippy
This commit is contained in:
parent
d06fded946
commit
19cc8ab315
9 changed files with 22 additions and 36 deletions
|
@ -187,7 +187,7 @@ pub trait BufMut {
|
|||
let d = self.chunk_mut();
|
||||
l = cmp::min(s.len(), d.len());
|
||||
|
||||
ptr::copy_nonoverlapping(s.as_ptr(), d.as_mut_ptr() as *mut u8, l);
|
||||
ptr::copy_nonoverlapping(s.as_ptr(), d.as_mut_ptr(), l);
|
||||
}
|
||||
|
||||
src.advance(l);
|
||||
|
@ -228,11 +228,7 @@ pub trait BufMut {
|
|||
let dst = self.chunk_mut();
|
||||
cnt = cmp::min(dst.len(), src.len() - off);
|
||||
|
||||
ptr::copy_nonoverlapping(
|
||||
src[off..].as_ptr(),
|
||||
dst.as_mut_ptr() as *mut u8,
|
||||
cnt,
|
||||
);
|
||||
ptr::copy_nonoverlapping(src[off..].as_ptr(), dst.as_mut_ptr(), cnt);
|
||||
|
||||
off += cnt;
|
||||
}
|
||||
|
|
|
@ -1607,11 +1607,7 @@ impl BufMut for BytesMut {
|
|||
self.reserve(len);
|
||||
|
||||
unsafe {
|
||||
ptr::copy_nonoverlapping(
|
||||
src.as_ptr(),
|
||||
self.chunk_mut().as_mut_ptr() as *mut u8,
|
||||
len,
|
||||
);
|
||||
ptr::copy_nonoverlapping(src.as_ptr(), self.chunk_mut().as_mut_ptr(), len);
|
||||
self.advance_mut(len);
|
||||
}
|
||||
}
|
||||
|
@ -2418,11 +2414,7 @@ impl BufMut for BytesVec {
|
|||
self.reserve(len);
|
||||
|
||||
unsafe {
|
||||
ptr::copy_nonoverlapping(
|
||||
src.as_ptr(),
|
||||
self.chunk_mut().as_mut_ptr() as *mut u8,
|
||||
len,
|
||||
);
|
||||
ptr::copy_nonoverlapping(src.as_ptr(), self.chunk_mut().as_mut_ptr(), len);
|
||||
self.advance_mut(len);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue