@@ -315,15 +315,15 @@ fn digits_to_dec_str<'a>(buf: &'a [u8], exp: i16, frac_digits: usize,
315
315
}
316
316
}
317
317
318
- /// Formats given decimal digits `0.<...buf...> * 10^exp` into the exponential form
319
- /// with at least given number of significant digits. When `upper` is true,
318
+ /// Formats the given decimal digits `0.<...buf...> * 10^exp` into the exponential
319
+ /// form with at least the given number of significant digits. When `upper` is ` true` ,
320
320
/// the exponent will be prefixed by `E`; otherwise that's `e`. The result is
321
321
/// stored to the supplied parts array and a slice of written parts is returned.
322
322
///
323
323
/// `min_digits` can be less than the number of actual significant digits in `buf`;
324
324
/// it will be ignored and full digits will be printed. It is only used to print
325
- /// additional zeroes after rendered digits. Thus `min_digits` of 0 means that
326
- /// it will only print given digits and nothing else.
325
+ /// additional zeroes after rendered digits. Thus, `min_digits == 0` means that
326
+ /// it will only print the given digits and nothing else.
327
327
fn digits_to_exp_str < ' a > ( buf : & ' a [ u8 ] , exp : i16 , min_ndigits : usize , upper : bool ,
328
328
parts : & ' a mut [ Part < ' a > ] ) -> & ' a [ Part < ' a > ] {
329
329
assert ! ( !buf. is_empty( ) ) ;
@@ -384,7 +384,7 @@ fn determine_sign(sign: Sign, decoded: &FullDecoded, negative: bool) -> &'static
384
384
}
385
385
}
386
386
387
- /// Formats given floating point number into the decimal form with at least
387
+ /// Formats the given floating point number into the decimal form with at least
388
388
/// given number of fractional digits. The result is stored to the supplied parts
389
389
/// array while utilizing given byte buffer as a scratch. `upper` is currently
390
390
/// unused but left for the future decision to change the case of non-finite values,
@@ -438,7 +438,7 @@ pub fn to_shortest_str<'a, T, F>(mut format_shortest: F, v: T,
438
438
}
439
439
}
440
440
441
- /// Formats given floating point number into the decimal form or
441
+ /// Formats the given floating point number into the decimal form or
442
442
/// the exponential form, depending on the resulting exponent. The result is
443
443
/// stored to the supplied parts array while utilizing given byte buffer
444
444
/// as a scratch. `upper` is used to determine the case of non-finite values
@@ -497,7 +497,7 @@ pub fn to_shortest_exp_str<'a, T, F>(mut format_shortest: F, v: T,
497
497
}
498
498
}
499
499
500
- /// Returns rather crude approximation (upper bound) for the maximum buffer size
500
+ /// Returns a rather crude approximation (upper bound) for the maximum buffer size
501
501
/// calculated from the given decoded exponent.
502
502
///
503
503
/// The exact limit is:
0 commit comments