@@ -20,15 +20,15 @@ fn smoke() {
20
20
#[ test]
21
21
fn drop_full ( ) {
22
22
let ( tx, _rx) = channel :: < Box < isize > > ( ) ;
23
- tx. send ( box 1 ) . unwrap ( ) ;
23
+ tx. send ( Box :: new ( 1 ) ) . unwrap ( ) ;
24
24
}
25
25
26
26
#[ test]
27
27
fn drop_full_shared ( ) {
28
28
let ( tx, _rx) = channel :: < Box < isize > > ( ) ;
29
29
drop ( tx. clone ( ) ) ;
30
30
drop ( tx. clone ( ) ) ;
31
- tx. send ( box 1 ) . unwrap ( ) ;
31
+ tx. send ( Box :: new ( 1 ) ) . unwrap ( ) ;
32
32
}
33
33
34
34
#[ test]
@@ -229,7 +229,7 @@ fn oneshot_single_thread_send_port_close() {
229
229
// Testing that the sender cleans up the payload if receiver is closed
230
230
let ( tx, rx) = channel :: < Box < i32 > > ( ) ;
231
231
drop ( rx) ;
232
- assert ! ( tx. send( box 0 ) . is_err( ) ) ;
232
+ assert ! ( tx. send( Box :: new ( 0 ) ) . is_err( ) ) ;
233
233
}
234
234
235
235
#[ test]
@@ -248,7 +248,7 @@ fn oneshot_single_thread_recv_chan_close() {
248
248
#[ test]
249
249
fn oneshot_single_thread_send_then_recv ( ) {
250
250
let ( tx, rx) = channel :: < Box < i32 > > ( ) ;
251
- tx. send ( box 10 ) . unwrap ( ) ;
251
+ tx. send ( Box :: new ( 10 ) ) . unwrap ( ) ;
252
252
assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
253
253
}
254
254
@@ -309,7 +309,7 @@ fn oneshot_multi_task_recv_then_send() {
309
309
assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
310
310
} ) ;
311
311
312
- tx. send ( box 10 ) . unwrap ( ) ;
312
+ tx. send ( Box :: new ( 10 ) ) . unwrap ( ) ;
313
313
}
314
314
315
315
#[ test]
@@ -374,7 +374,7 @@ fn oneshot_multi_thread_send_recv_stress() {
374
374
for _ in 0 ..stress_factor ( ) {
375
375
let ( tx, rx) = channel :: < Box < isize > > ( ) ;
376
376
let _t = thread:: spawn ( move || {
377
- tx. send ( box 10 ) . unwrap ( ) ;
377
+ tx. send ( Box :: new ( 10 ) ) . unwrap ( ) ;
378
378
} ) ;
379
379
assert ! ( * rx. recv( ) . unwrap( ) == 10 ) ;
380
380
}
@@ -394,7 +394,7 @@ fn stream_send_recv_stress() {
394
394
}
395
395
396
396
thread:: spawn ( move || {
397
- tx. send ( box i ) . unwrap ( ) ;
397
+ tx. send ( Box :: new ( i ) ) . unwrap ( ) ;
398
398
send ( tx, i + 1 ) ;
399
399
} ) ;
400
400
}
0 commit comments