@@ -2288,11 +2288,18 @@ pub(crate) fn to_str_radix_reversed(u: &BigUint, radix: u32) -> Vec<u8> {
2288
2288
res
2289
2289
}
2290
2290
2291
- #[ cfg( u64_digit) ]
2291
+ /// An iterator of `u32` digits representation of the `BigUint` ordered least
2292
+ /// significant digit first.
2292
2293
pub struct IterU32Digits < ' a > {
2294
+ #[ cfg( u64_digit) ]
2293
2295
data : & ' a [ u64 ] ,
2296
+ #[ cfg( u64_digit) ]
2294
2297
next_is_lo : bool ,
2298
+ #[ cfg( u64_digit) ]
2295
2299
last_hi_is_zero : bool ,
2300
+
2301
+ #[ cfg( not( u64_digit) ) ]
2302
+ it : core:: slice:: Iter < ' a , u32 > ,
2296
2303
}
2297
2304
#[ cfg( u64_digit) ]
2298
2305
impl < ' a > IterU32Digits < ' a > {
@@ -2361,10 +2368,6 @@ impl<'a> ExactSizeIterator for IterU32Digits<'a> {
2361
2368
}
2362
2369
}
2363
2370
2364
- #[ cfg( not( u64_digit) ) ]
2365
- pub struct IterU32Digits < ' a > {
2366
- it : core:: slice:: Iter < ' a , u32 > ,
2367
- }
2368
2371
#[ cfg( not( u64_digit) ) ]
2369
2372
impl < ' a > IterU32Digits < ' a > {
2370
2373
fn new ( data : & ' a [ u32 ] ) -> Self {
@@ -2403,9 +2406,14 @@ impl<'a> ExactSizeIterator for IterU32Digits<'a> {
2403
2406
2404
2407
impl < ' a > FusedIterator for IterU32Digits < ' a > { }
2405
2408
2406
- #[ cfg( not( u64_digit) ) ]
2409
+ /// An iterator of `u64` digits representation of the `BigUint` ordered least
2410
+ /// significant digit first.
2407
2411
pub struct IterU64Digits < ' a > {
2412
+ #[ cfg( not( u64_digit) ) ]
2408
2413
it : core:: slice:: Chunks < ' a , u32 > ,
2414
+
2415
+ #[ cfg( u64_digit) ]
2416
+ it : core:: slice:: Iter < ' a , u64 > ,
2409
2417
}
2410
2418
#[ cfg( not( u64_digit) ) ]
2411
2419
impl < ' a > IterU64Digits < ' a > {
@@ -2441,10 +2449,6 @@ impl<'a> ExactSizeIterator for IterU64Digits<'a> {
2441
2449
}
2442
2450
}
2443
2451
2444
- #[ cfg( u64_digit) ]
2445
- pub struct IterU64Digits < ' a > {
2446
- it : core:: slice:: Iter < ' a , u64 > ,
2447
- }
2448
2452
#[ cfg( u64_digit) ]
2449
2453
impl < ' a > IterU64Digits < ' a > {
2450
2454
fn new ( data : & ' a [ u64 ] ) -> Self {
0 commit comments