@@ -410,8 +410,8 @@ fn determine_sign(sign: Sign, decoded: &FullDecoded, negative: bool) -> &'static
410
410
/// it will only print given digits and nothing else.
411
411
///
412
412
/// The byte buffer should be at least `MAX_SIG_DIGITS` bytes long.
413
- /// There should be at least 5 parts available, due to the worst case like
414
- /// `[+][0.][0000][45 ][0000]` with `frac_digits = 10`.
413
+ /// There should be at least 4 parts available, due to the worst case like
414
+ /// `[+][0.][0000][2 ][0000]` with `frac_digits = 10`.
415
415
pub fn to_shortest_str < ' a , T , F > ( mut format_shortest : F , v : T ,
416
416
sign : Sign , frac_digits : usize , _upper : bool ,
417
417
buf : & ' a mut [ u8 ] , parts : & ' a mut [ Part < ' a > ] ) -> Formatted < ' a >
@@ -465,8 +465,8 @@ pub fn to_shortest_str<'a, T, F>(mut format_shortest: F, v: T,
465
465
/// cannot be in this range, avoiding any confusion.
466
466
///
467
467
/// The byte buffer should be at least `MAX_SIG_DIGITS` bytes long.
468
- /// There should be at least 7 parts available, due to the worst case like
469
- /// `[+][1][.][2345][e][-][67 ]`.
468
+ /// There should be at least 6 parts available, due to the worst case like
469
+ /// `[+][1][.][2345][e][-][6 ]`.
470
470
pub fn to_shortest_exp_str < ' a , T , F > ( mut format_shortest : F , v : T ,
471
471
sign : Sign , dec_bounds : ( i16 , i16 ) , upper : bool ,
472
472
buf : & ' a mut [ u8 ] , parts : & ' a mut [ Part < ' a > ] ) -> Formatted < ' a >
@@ -544,8 +544,8 @@ fn estimate_max_buf_len(exp: i16) -> usize {
544
544
/// The byte buffer should be at least `ndigits` bytes long unless `ndigits` is
545
545
/// so large that only the fixed number of digits will be ever written.
546
546
/// (The tipping point for `f64` is about 800, so 1000 bytes should be enough.)
547
- /// There should be at least 7 parts available, due to the worst case like
548
- /// `[+][1][.][2345][e][-][67 ]`.
547
+ /// There should be at least 6 parts available, due to the worst case like
548
+ /// `[+][1][.][2345][e][-][6 ]`.
549
549
pub fn to_exact_exp_str < ' a , T , F > ( mut format_exact : F , v : T ,
550
550
sign : Sign , ndigits : usize , upper : bool ,
551
551
buf : & ' a mut [ u8 ] , parts : & ' a mut [ Part < ' a > ] ) -> Formatted < ' a >
@@ -600,8 +600,8 @@ pub fn to_exact_exp_str<'a, T, F>(mut format_exact: F, v: T,
600
600
/// The byte buffer should be enough for the output unless `frac_digits` is
601
601
/// so large that only the fixed number of digits will be ever written.
602
602
/// (The tipping point for `f64` is about 800, and 1000 bytes should be enough.)
603
- /// There should be at least 5 parts available, due to the worst case like
604
- /// `[+][0.][0000][45 ][0000]` with `frac_digits = 10`.
603
+ /// There should be at least 4 parts available, due to the worst case like
604
+ /// `[+][0.][0000][2 ][0000]` with `frac_digits = 10`.
605
605
pub fn to_exact_fixed_str < ' a , T , F > ( mut format_exact : F , v : T ,
606
606
sign : Sign , frac_digits : usize , _upper : bool ,
607
607
buf : & ' a mut [ u8 ] , parts : & ' a mut [ Part < ' a > ] ) -> Formatted < ' a >
0 commit comments