Skip to content

Commit c22d896

Browse files
committed
Change AllocRef::by_ref to take &self instead of &mut self
1 parent 4529af9 commit c22d896

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/alloc/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ pub unsafe trait AllocRef {
337337
///
338338
/// The returned adaptor also implements `AllocRef` and will simply borrow this.
339339
#[inline(always)]
340-
fn by_ref(&mut self) -> &Self {
340+
fn by_ref(&self) -> &Self {
341341
self
342342
}
343343
}

0 commit comments

Comments
 (0)