File tree 3 files changed +29
-5
lines changed
3 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 13
13
- cron : ' 0 1 * * *'
14
14
15
15
env :
16
- RUSTFLAGS : -Dwarnings
16
+ CARGO_INCREMENTAL : 0
17
+ CARGO_NET_RETRY : 10
17
18
RUST_BACKTRACE : 1
19
+ RUSTFLAGS : -D warnings
20
+ RUSTUP_MAX_RETRIES : 10
18
21
19
22
defaults :
20
23
run :
Original file line number Diff line number Diff line change 9
9
- crossbeam-[0-9]+.*
10
10
- crossbeam-[a-z]+-[0-9]+.*
11
11
12
- env :
13
- RUSTFLAGS : -Dwarnings
14
- RUST_BACKTRACE : 1
15
-
16
12
defaults :
17
13
run :
18
14
shell : bash
Original file line number Diff line number Diff line change @@ -558,3 +558,28 @@ fn channel_through_channel() {
558
558
} )
559
559
. unwrap ( ) ;
560
560
}
561
+
562
+ #[ test]
563
+ fn overflow ( ) {
564
+ let max = u32:: max_value ( ) as usize ;
565
+ let ( s, r) = unbounded :: < ( ) > ( ) ;
566
+ for i in 0 ..max {
567
+ assert_eq ! ( s. len( ) , i) ;
568
+ s. send ( ( ) ) . unwrap ( ) ;
569
+ }
570
+ assert_eq ! ( s. len( ) , max) ;
571
+ s. send ( ( ) ) . unwrap ( ) ;
572
+ drop ( r) ;
573
+ // for _ in 0..max {
574
+ // r.recv().unwrap();
575
+ // }
576
+ // assert_eq!(
577
+ // r.try_recv().unwrap_err(),
578
+ // crossbeam_channel::TryRecvError::Empty
579
+ // );
580
+ // drop(s);
581
+ // assert_eq!(
582
+ // r.try_recv().unwrap_err(),
583
+ // crossbeam_channel::TryRecvError::Disconnected
584
+ // );
585
+ }
You can’t perform that action at this time.
0 commit comments