File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1143,9 +1143,9 @@ pub unsafe trait Alloc {
11431143 where Self : Sized
11441144 {
11451145 match Layout :: array :: < T > ( n) {
1146- Ok ( ref layout) if layout. size ( ) > 0 => {
1146+ Ok ( layout) if layout. size ( ) > 0 => {
11471147 unsafe {
1148- self . alloc ( layout. clone ( ) ) . map ( |p| p. cast ( ) )
1148+ self . alloc ( layout) . map ( |p| p. cast ( ) )
11491149 }
11501150 }
11511151 _ => Err ( AllocErr ) ,
@@ -1193,9 +1193,9 @@ pub unsafe trait Alloc {
11931193 where Self : Sized
11941194 {
11951195 match ( Layout :: array :: < T > ( n_old) , Layout :: array :: < T > ( n_new) ) {
1196- ( Ok ( ref k_old) , Ok ( ref k_new) ) if k_old. size ( ) > 0 && k_new. size ( ) > 0 => {
1196+ ( Ok ( k_old) , Ok ( k_new) ) if k_old. size ( ) > 0 && k_new. size ( ) > 0 => {
11971197 debug_assert ! ( k_old. align( ) == k_new. align( ) ) ;
1198- self . realloc ( ptr. cast ( ) , k_old. clone ( ) , k_new. size ( ) ) . map ( NonNull :: cast)
1198+ self . realloc ( ptr. cast ( ) , k_old, k_new. size ( ) ) . map ( NonNull :: cast)
11991199 }
12001200 _ => {
12011201 Err ( AllocErr )
@@ -1227,8 +1227,8 @@ pub unsafe trait Alloc {
12271227 where Self : Sized
12281228 {
12291229 match Layout :: array :: < T > ( n) {
1230- Ok ( ref k) if k. size ( ) > 0 => {
1231- Ok ( self . dealloc ( ptr. cast ( ) , k. clone ( ) ) )
1230+ Ok ( k) if k. size ( ) > 0 => {
1231+ Ok ( self . dealloc ( ptr. cast ( ) , k) )
12321232 }
12331233 _ => {
12341234 Err ( AllocErr )
You can’t perform that action at this time.
0 commit comments