]> git.lizzy.rs Git - rust.git/commitdiff
Change `AllocRef::by_ref` to take `&self` instead of `&mut self`
authorTim Diekmann <tim.diekmann@3dvision.de>
Mon, 28 Sep 2020 08:42:29 +0000 (10:42 +0200)
committerTim Diekmann <tim.diekmann@3dvision.de>
Mon, 28 Sep 2020 08:42:29 +0000 (10:42 +0200)
library/core/src/alloc/mod.rs

index f9eb8981bbfc24d1a8dafeb52803d4b391edec3c..6b14e06e4527dd82371d845165af98f3bb45a76d 100644 (file)
@@ -337,7 +337,7 @@ unsafe fn shrink(
     ///
     /// 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
     }
 }