diff options
| author | Tim Diekmann <tim.diekmann@3dvision.de> | 2020-09-28 10:42:29 +0200 |
|---|---|---|
| committer | Tim Diekmann <tim.diekmann@3dvision.de> | 2020-09-28 10:42:29 +0200 |
| commit | c22d896b9b1754b04e1dfbec14f056b374f35b62 (patch) | |
| tree | 525b396e0bcdab8120953fd4d4c7eca4d53c68b3 | |
| parent | 4529af972e55f8f85afaada0ee2dd18ab8653637 (diff) | |
Change `AllocRef::by_ref` to take `&self` instead of `&mut self`
| -rw-r--r-- | library/core/src/alloc/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs index f9eb8981bbf..6b14e06e452 100644 --- a/library/core/src/alloc/mod.rs +++ b/library/core/src/alloc/mod.rs @@ -337,7 +337,7 @@ pub unsafe trait AllocRef { /// /// The returned adaptor also implements `AllocRef` and will simply borrow this. #[inline(always)] - fn by_ref(&mut self) -> &Self { + fn by_ref(&self) -> &Self { self } } |
