@@ -1924,7 +1924,7 @@ mod tests {
1924
1924
fn oneshot_single_thread_send_then_recv ( ) {
1925
1925
let ( tx, rx) = channel :: < Box < i32 > > ( ) ;
1926
1926
tx. send ( box 10 ) . unwrap ( ) ;
1927
- assert ! ( rx. recv( ) . unwrap( ) == box 10 ) ;
1927
+ assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
1928
1928
}
1929
1929
1930
1930
#[ test]
@@ -1981,7 +1981,7 @@ mod tests {
1981
1981
fn oneshot_multi_task_recv_then_send ( ) {
1982
1982
let ( tx, rx) = channel :: < Box < i32 > > ( ) ;
1983
1983
let _t = thread:: spawn ( move || {
1984
- assert ! ( rx. recv( ) . unwrap( ) == box 10 ) ;
1984
+ assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
1985
1985
} ) ;
1986
1986
1987
1987
tx. send ( box 10 ) . unwrap ( ) ;
@@ -1994,7 +1994,7 @@ mod tests {
1994
1994
drop ( tx) ;
1995
1995
} ) ;
1996
1996
let res = thread:: spawn ( move || {
1997
- assert ! ( rx. recv( ) . unwrap( ) == box 10 ) ;
1997
+ assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
1998
1998
} ) . join ( ) ;
1999
1999
assert ! ( res. is_err( ) ) ;
2000
2000
}
@@ -2048,7 +2048,7 @@ mod tests {
2048
2048
let _t = thread:: spawn ( move || {
2049
2049
tx. send ( box 10 ) . unwrap ( ) ;
2050
2050
} ) ;
2051
- assert ! ( rx. recv( ) . unwrap( ) == box 10 ) ;
2051
+ assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
2052
2052
}
2053
2053
}
2054
2054
@@ -2073,7 +2073,7 @@ mod tests {
2073
2073
if i == 10 { return }
2074
2074
2075
2075
thread:: spawn ( move || {
2076
- assert ! ( rx. recv( ) . unwrap( ) == box i) ;
2076
+ assert ! ( * rx. recv( ) . unwrap( ) == i) ;
2077
2077
recv ( rx, i + 1 ) ;
2078
2078
} ) ;
2079
2079
}
@@ -2610,7 +2610,7 @@ mod sync_tests {
2610
2610
fn oneshot_single_thread_send_then_recv ( ) {
2611
2611
let ( tx, rx) = sync_channel :: < Box < i32 > > ( 1 ) ;
2612
2612
tx. send ( box 10 ) . unwrap ( ) ;
2613
- assert ! ( rx. recv( ) . unwrap( ) == box 10 ) ;
2613
+ assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
2614
2614
}
2615
2615
2616
2616
#[ test]
@@ -2682,7 +2682,7 @@ mod sync_tests {
2682
2682
fn oneshot_multi_task_recv_then_send ( ) {
2683
2683
let ( tx, rx) = sync_channel :: < Box < i32 > > ( 0 ) ;
2684
2684
let _t = thread:: spawn ( move || {
2685
- assert ! ( rx. recv( ) . unwrap( ) == box 10 ) ;
2685
+ assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
2686
2686
} ) ;
2687
2687
2688
2688
tx. send ( box 10 ) . unwrap ( ) ;
@@ -2695,7 +2695,7 @@ mod sync_tests {
2695
2695
drop ( tx) ;
2696
2696
} ) ;
2697
2697
let res = thread:: spawn ( move || {
2698
- assert ! ( rx. recv( ) . unwrap( ) == box 10 ) ;
2698
+ assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
2699
2699
} ) . join ( ) ;
2700
2700
assert ! ( res. is_err( ) ) ;
2701
2701
}
@@ -2749,7 +2749,7 @@ mod sync_tests {
2749
2749
let _t = thread:: spawn ( move || {
2750
2750
tx. send ( box 10 ) . unwrap ( ) ;
2751
2751
} ) ;
2752
- assert ! ( rx. recv( ) . unwrap( ) == box 10 ) ;
2752
+ assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
2753
2753
}
2754
2754
}
2755
2755
@@ -2774,7 +2774,7 @@ mod sync_tests {
2774
2774
if i == 10 { return }
2775
2775
2776
2776
thread:: spawn ( move || {
2777
- assert ! ( rx. recv( ) . unwrap( ) == box i) ;
2777
+ assert ! ( * rx. recv( ) . unwrap( ) == i) ;
2778
2778
recv ( rx, i + 1 ) ;
2779
2779
} ) ;
2780
2780
}
0 commit comments