File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -779,26 +779,12 @@ trait RcBoxPtr<T> {
779779
780780impl < 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
792785impl < 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) ]
You can’t perform that action at this time.
0 commit comments