Skip to content

Commit

Permalink
Auto merge of #77289 - TimDiekmann:alloc-ref-by-ref, r=Amanieu
Browse files Browse the repository at this point in the history
Change `AllocRef::by_ref` to take `&self` instead of `&mut self`

r? `@Amanieu`
  • Loading branch information
bors committed Sep 29, 2020
2 parents 381b445 + c22d896 commit 0d97f7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 0d97f7a

Please sign in to comment.