change some statics to constants
This commit is contained in:
@@ -24,7 +24,6 @@ use num::flt2dec::estimator::estimate_scaling_factor;
|
||||
use num::flt2dec::bignum::Digit32 as Digit;
|
||||
use num::flt2dec::bignum::Big32x36 as Big;
|
||||
|
||||
// FIXME(#22540) const ref to static array seems to ICE
|
||||
static POW10: [Digit; 10] = [1, 10, 100, 1000, 10000, 100000,
|
||||
1000000, 10000000, 100000000, 1000000000];
|
||||
static TWOPOW10: [Digit; 10] = [2, 20, 200, 2000, 20000, 200000,
|
||||
@@ -328,4 +327,3 @@ pub fn format_exact(d: &Decoded, buf: &mut [u8], limit: i16) -> (/*#digits*/ usi
|
||||
|
||||
(len, k)
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ for i in xrange(-308, 333, 8):
|
||||
f = ((f << 64 >> (l-1)) + 1) >> 1; e += l - 64
|
||||
print ' (%#018x, %5d, %4d),' % (f, e, i)
|
||||
*/
|
||||
// FIXME(#22540) const ref to static array seems to ICE
|
||||
|
||||
#[doc(hidden)]
|
||||
pub static CACHED_POW10: [(u64, i16, i16); 81] = [ // (f, e, k)
|
||||
(0xe61acf033d1a45df, -1087, -308),
|
||||
@@ -746,4 +746,3 @@ pub fn format_exact(d: &Decoded, buf: &mut [u8], limit: i16) -> (/*#digits*/ usi
|
||||
None => fallback(d, buf, limit),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user