mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
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
1 changed files with 1 additions and 6 deletions
|
@ -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 a new issue