File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,6 @@ use core::option::Option::{Some, None};
160
160
use core:: ptr:: { self , PtrExt } ;
161
161
use core:: result:: Result ;
162
162
use core:: result:: Result :: { Ok , Err } ;
163
- use core:: intrinsics:: assume;
164
163
165
164
use heap:: deallocate;
166
165
@@ -752,20 +751,10 @@ trait RcBoxPtr<T> {
752
751
fn strong ( & self ) -> uint { self . inner ( ) . strong . get ( ) }
753
752
754
753
#[ inline]
755
- fn inc_strong ( & self ) {
756
- let strong = self . strong ( ) ;
757
- // The reference count is always at least one unless we're about to drop the type
758
- unsafe { assume ( strong > 0 ) ; }
759
- self . inner ( ) . strong . set ( strong + 1 ) ;
760
- }
754
+ fn inc_strong ( & self ) { self . inner ( ) . strong . set ( self . strong ( ) + 1 ) ; }
761
755
762
756
#[ inline]
763
- fn dec_strong ( & self ) {
764
- let strong = self . strong ( ) ;
765
- // The reference count is always at least one unless we're about to drop the type
766
- unsafe { assume ( strong > 0 ) ; }
767
- self . inner ( ) . strong . set ( strong - 1 ) ;
768
- }
757
+ fn dec_strong ( & self ) { self . inner ( ) . strong . set ( self . strong ( ) - 1 ) ; }
769
758
770
759
#[ inline]
771
760
fn weak ( & self ) -> uint { self . inner ( ) . weak . get ( ) }
You can’t perform that action at this time.
0 commit comments