@@ -266,12 +266,12 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool {
266266/// ```
267267/// use std::rc::{self, Rc};
268268///
269- /// let x = Rc::new(3u );
270- /// assert_eq!(rc::try_unwrap(x), Ok(3u ));
269+ /// let x = Rc::new(3 );
270+ /// assert_eq!(rc::try_unwrap(x), Ok(3 ));
271271///
272- /// let x = Rc::new(4u );
272+ /// let x = Rc::new(4 );
273273/// let _y = x.clone();
274- /// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4u )));
274+ /// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4 )));
275275/// ```
276276#[ inline]
277277#[ unstable( feature = "alloc" ) ]
@@ -300,9 +300,9 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> {
300300/// ```
301301/// use std::rc::{self, Rc};
302302///
303- /// let mut x = Rc::new(3u );
304- /// *rc::get_mut(&mut x).unwrap() = 4u ;
305- /// assert_eq!(*x, 4u );
303+ /// let mut x = Rc::new(3 );
304+ /// *rc::get_mut(&mut x).unwrap() = 4 ;
305+ /// assert_eq!(*x, 4 );
306306///
307307/// let _y = x.clone();
308308/// assert!(rc::get_mut(&mut x).is_none());
@@ -845,7 +845,7 @@ mod tests {
845845
846846 #[ test]
847847 fn is_unique ( ) {
848- let x = Rc :: new ( 3 u ) ;
848+ let x = Rc :: new ( 3 ) ;
849849 assert ! ( super :: is_unique( & x) ) ;
850850 let y = x. clone ( ) ;
851851 assert ! ( !super :: is_unique( & x) ) ;
@@ -893,21 +893,21 @@ mod tests {
893893
894894 #[ test]
895895 fn try_unwrap ( ) {
896- let x = Rc :: new ( 3 u ) ;
897- assert_eq ! ( super :: try_unwrap( x) , Ok ( 3 u ) ) ;
898- let x = Rc :: new ( 4 u ) ;
896+ let x = Rc :: new ( 3 ) ;
897+ assert_eq ! ( super :: try_unwrap( x) , Ok ( 3 ) ) ;
898+ let x = Rc :: new ( 4 ) ;
899899 let _y = x. clone ( ) ;
900- assert_eq ! ( super :: try_unwrap( x) , Err ( Rc :: new( 4 u ) ) ) ;
901- let x = Rc :: new ( 5 u ) ;
900+ assert_eq ! ( super :: try_unwrap( x) , Err ( Rc :: new( 4 ) ) ) ;
901+ let x = Rc :: new ( 5 ) ;
902902 let _w = x. downgrade ( ) ;
903- assert_eq ! ( super :: try_unwrap( x) , Err ( Rc :: new( 5 u ) ) ) ;
903+ assert_eq ! ( super :: try_unwrap( x) , Err ( Rc :: new( 5 ) ) ) ;
904904 }
905905
906906 #[ test]
907907 fn get_mut ( ) {
908- let mut x = Rc :: new ( 3 u ) ;
909- * super :: get_mut ( & mut x) . unwrap ( ) = 4 u ;
910- assert_eq ! ( * x, 4 u ) ;
908+ let mut x = Rc :: new ( 3 ) ;
909+ * super :: get_mut ( & mut x) . unwrap ( ) = 4 ;
910+ assert_eq ! ( * x, 4 ) ;
911911 let y = x. clone ( ) ;
912912 assert ! ( super :: get_mut( & mut x) . is_none( ) ) ;
913913 drop ( y) ;
@@ -918,7 +918,7 @@ mod tests {
918918
919919 #[ test]
920920 fn test_cowrc_clone_make_unique ( ) {
921- let mut cow0 = Rc :: new ( 75 u ) ;
921+ let mut cow0 = Rc :: new ( 75 ) ;
922922 let mut cow1 = cow0. clone ( ) ;
923923 let mut cow2 = cow1. clone ( ) ;
924924
@@ -942,7 +942,7 @@ mod tests {
942942
943943 #[ test]
944944 fn test_cowrc_clone_unique2 ( ) {
945- let mut cow0 = Rc :: new ( 75 u ) ;
945+ let mut cow0 = Rc :: new ( 75 ) ;
946946 let cow1 = cow0. clone ( ) ;
947947 let cow2 = cow1. clone ( ) ;
948948
@@ -965,7 +965,7 @@ mod tests {
965965
966966 #[ test]
967967 fn test_cowrc_clone_weak ( ) {
968- let mut cow0 = Rc :: new ( 75 u ) ;
968+ let mut cow0 = Rc :: new ( 75 ) ;
969969 let cow1_weak = cow0. downgrade ( ) ;
970970
971971 assert ! ( 75 == * cow0) ;
@@ -979,7 +979,7 @@ mod tests {
979979
980980 #[ test]
981981 fn test_show ( ) {
982- let foo = Rc :: new ( 75 u ) ;
982+ let foo = Rc :: new ( 75 ) ;
983983 assert_eq ! ( format!( "{:?}" , foo) , "75" ) ;
984984 }
985985
0 commit comments