File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,9 @@ fn find_last_folder_yields_last_match() {
104
104
/// Produce a parallel iterator for 0u128..10²⁷
105
105
#[ cfg( has_i128) ]
106
106
fn octillion ( ) -> impl ParallelIterator < Item = u128 > {
107
- ( 0u128 ..1_000_000_000_000_000_000_000_000_000 ) . into_par_iter ( )
107
+ // Using parse because some versions of rust don't allow long literals
108
+ let octillion = "1000000000000000000000000000" . parse :: < u128 > ( ) . unwrap ( ) ;
109
+ ( 0u128 ..octillion) . into_par_iter ( )
108
110
}
109
111
110
112
/// Produce a parallel iterator for 0u128..10²⁷
Original file line number Diff line number Diff line change @@ -203,7 +203,8 @@ pub fn check_range_split_at_overflow() {
203
203
#[ cfg( has_i128) ]
204
204
#[ test]
205
205
pub fn test_i128_len_doesnt_overflow ( ) {
206
- let octillion = 1_000_000_000_000_000_000_000_000_000i128 ;
206
+ // Using parse because some versions of rust don't allow long literals
207
+ let octillion = "1000000000000000000000000000" . parse :: < i128 > ( ) . unwrap ( ) ;
207
208
let producer = IterProducer { range : 0 ..octillion } ;
208
209
209
210
assert_eq ! ( octillion as u128 , producer. len( ) ) ;
You can’t perform that action at this time.
0 commit comments