Skip to content

Commit 289130d

Browse files
committed
Implicitly use deref
1 parent 6a3d131 commit 289130d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/impl_ref_types.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl<A, D> AsRef<RawRef<A, D>> for ArrayRef<A, D>
185185
{
186186
fn as_ref(&self) -> &RawRef<A, D>
187187
{
188-
&**self
188+
self
189189
}
190190
}
191191

@@ -194,7 +194,7 @@ impl<A, D> AsMut<RawRef<A, D>> for ArrayRef<A, D>
194194
{
195195
fn as_mut(&mut self) -> &mut RawRef<A, D>
196196
{
197-
&mut **self
197+
self
198198
}
199199
}
200200

@@ -203,7 +203,7 @@ impl<A, D> AsRef<LayoutRef<A, D>> for ArrayRef<A, D>
203203
{
204204
fn as_ref(&self) -> &LayoutRef<A, D>
205205
{
206-
&***self
206+
self
207207
}
208208
}
209209

@@ -212,7 +212,7 @@ impl<A, D> AsMut<LayoutRef<A, D>> for ArrayRef<A, D>
212212
{
213213
fn as_mut(&mut self) -> &mut LayoutRef<A, D>
214214
{
215-
&mut ***self
215+
self
216216
}
217217
}
218218

@@ -221,7 +221,7 @@ impl<A, D> AsRef<LayoutRef<A, D>> for RawRef<A, D>
221221
{
222222
fn as_ref(&self) -> &LayoutRef<A, D>
223223
{
224-
&**self
224+
self
225225
}
226226
}
227227

@@ -230,7 +230,7 @@ impl<A, D> AsMut<LayoutRef<A, D>> for RawRef<A, D>
230230
{
231231
fn as_mut(&mut self) -> &mut LayoutRef<A, D>
232232
{
233-
&mut **self
233+
self
234234
}
235235
}
236236

@@ -314,7 +314,7 @@ where S: Data
314314
{
315315
fn borrow(&self) -> &ArrayRef<S::Elem, D>
316316
{
317-
&**self
317+
self
318318
}
319319
}
320320

@@ -325,7 +325,7 @@ where
325325
{
326326
fn borrow_mut(&mut self) -> &mut ArrayRef<S::Elem, D>
327327
{
328-
&mut **self
328+
self
329329
}
330330
}
331331

0 commit comments

Comments
 (0)