File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,11 @@ where
4747 // In the empty case, we can just reuse the existing pointer since
4848 // it won't be dereferenced anyway. It is not safe to offset by one
4949 // since the allocation may be empty.
50- self . ptr . cast ( )
50+ ptr_re
5151 } else {
52- // Safe because `self` is nonempty, so we can safely offset into
53- // the first element.
54- unsafe { self . ptr . cast ( ) . add ( 1 ) }
52+ // In the nonempty case, we can safely offset into the first
53+ // (complex) element.
54+ unsafe { ptr_re . add ( 1 ) }
5555 } ;
5656
5757 // `Complex` is `repr(C)` with only fields `re: T` and `im: T`. So, the
@@ -125,11 +125,11 @@ where
125125 // In the empty case, we can just reuse the existing pointer since
126126 // it won't be dereferenced anyway. It is not safe to offset by one
127127 // since the allocation may be empty.
128- self . ptr . cast ( )
128+ ptr_re
129129 } else {
130- // Safe because `self` is nonempty, so we can safely offset into
131- // the first element.
132- unsafe { self . ptr . cast ( ) . add ( 1 ) }
130+ // In the nonempty case, we can safely offset into the first
131+ // (complex) element.
132+ unsafe { ptr_re . add ( 1 ) }
133133 } ;
134134
135135 // `Complex` is `repr(C)` with only fields `re: T` and `im: T`. So, the
You can’t perform that action at this time.
0 commit comments