@@ -20,15 +20,15 @@ fn smoke() {
2020#[ test]
2121fn drop_full ( ) {
2222 let ( tx, _rx) = channel :: < Box < isize > > ( ) ;
23- tx. send ( box 1 ) . unwrap ( ) ;
23+ tx. send ( Box :: new ( 1 ) ) . unwrap ( ) ;
2424}
2525
2626#[ test]
2727fn drop_full_shared ( ) {
2828 let ( tx, _rx) = channel :: < Box < isize > > ( ) ;
2929 drop ( tx. clone ( ) ) ;
3030 drop ( tx. clone ( ) ) ;
31- tx. send ( box 1 ) . unwrap ( ) ;
31+ tx. send ( Box :: new ( 1 ) ) . unwrap ( ) ;
3232}
3333
3434#[ test]
@@ -229,7 +229,7 @@ fn oneshot_single_thread_send_port_close() {
229229 // Testing that the sender cleans up the payload if receiver is closed
230230 let ( tx, rx) = channel :: < Box < i32 > > ( ) ;
231231 drop ( rx) ;
232- assert ! ( tx. send( box 0 ) . is_err( ) ) ;
232+ assert ! ( tx. send( Box :: new ( 0 ) ) . is_err( ) ) ;
233233}
234234
235235#[ test]
@@ -248,7 +248,7 @@ fn oneshot_single_thread_recv_chan_close() {
248248#[ test]
249249fn oneshot_single_thread_send_then_recv ( ) {
250250 let ( tx, rx) = channel :: < Box < i32 > > ( ) ;
251- tx. send ( box 10 ) . unwrap ( ) ;
251+ tx. send ( Box :: new ( 10 ) ) . unwrap ( ) ;
252252 assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
253253}
254254
@@ -309,7 +309,7 @@ fn oneshot_multi_task_recv_then_send() {
309309 assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
310310 } ) ;
311311
312- tx. send ( box 10 ) . unwrap ( ) ;
312+ tx. send ( Box :: new ( 10 ) ) . unwrap ( ) ;
313313}
314314
315315#[ test]
@@ -374,7 +374,7 @@ fn oneshot_multi_thread_send_recv_stress() {
374374 for _ in 0 ..stress_factor ( ) {
375375 let ( tx, rx) = channel :: < Box < isize > > ( ) ;
376376 let _t = thread:: spawn ( move || {
377- tx. send ( box 10 ) . unwrap ( ) ;
377+ tx. send ( Box :: new ( 10 ) ) . unwrap ( ) ;
378378 } ) ;
379379 assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
380380 }
@@ -394,7 +394,7 @@ fn stream_send_recv_stress() {
394394 }
395395
396396 thread:: spawn ( move || {
397- tx. send ( box i ) . unwrap ( ) ;
397+ tx. send ( Box :: new ( i ) ) . unwrap ( ) ;
398398 send ( tx, i + 1 ) ;
399399 } ) ;
400400 }
0 commit comments