Simplify Clone for ThinSlicePtr (#8247)
# Objective The type `ThinSlicePtr` has a manual implementation of `Clone` that manually clones each field. Since this type implements `Copy`, we can change this implementation to simply dereference `&self`.
This commit is contained in:
parent
dbb9e428cd
commit
f219a08907
@ -368,12 +368,7 @@ impl<'a, T> ThinSlicePtr<'a, T> {
|
||||
|
||||
impl<'a, T> Clone for ThinSlicePtr<'a, T> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
ptr: self.ptr,
|
||||
#[cfg(debug_assertions)]
|
||||
len: self.len,
|
||||
_marker: PhantomData,
|
||||
}
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user