Skip to content

Commit

Permalink
Change AllocRef::by_ref to take &self instead of &mut self
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDiekmann committed Sep 28, 2020
1 parent 4529af9 commit c22d896
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 c22d896

Please sign in to comment.