Skip to content

Commit df2fbdf

Browse files
committed
---
yaml --- r: 176380 b: refs/heads/try c: e6f85c2 h: refs/heads/master v: v3
1 parent 1db4c88 commit df2fbdf

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: a530cc9706324ad44dba464d541a807eb5afdb08
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 777435990e0e91df6b72ce80c9b6fa485eeb5daa
5-
refs/heads/try: ee253c918d2fb961dbdf5c6dbe40dd7fee20148e
5+
refs/heads/try: e6f85c2f78bc0488c7cf08121b26dcbc85a846ba
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/liballoc/rc.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -779,26 +779,12 @@ trait RcBoxPtr<T> {
779779

780780
impl<T> RcBoxPtr<T> for Rc<T> {
781781
#[inline(always)]
782-
fn inner(&self) -> &RcBox<T> {
783-
unsafe {
784-
// Safe to assume this here, as if it weren't true, we'd be breaking
785-
// the contract anyway
786-
assume(!self._ptr.is_null());
787-
&(**self._ptr)
788-
}
789-
}
782+
fn inner(&self) -> &RcBox<T> { unsafe { &(**self._ptr) } }
790783
}
791784

792785
impl<T> RcBoxPtr<T> for Weak<T> {
793786
#[inline(always)]
794-
fn inner(&self) -> &RcBox<T> {
795-
unsafe {
796-
// Safe to assume this here, as if it weren't true, we'd be breaking
797-
// the contract anyway
798-
assume(!self._ptr.is_null());
799-
&(**self._ptr)
800-
}
801-
}
787+
fn inner(&self) -> &RcBox<T> { unsafe { &(**self._ptr) } }
802788
}
803789

804790
#[cfg(test)]

0 commit comments

Comments
 (0)