Skip to content

Commit

Permalink
Document the numeric value returned by string parsing for floats
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheww committed Apr 16, 2022
1 parent 6fa061c commit 16c81fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/core/src/num/dec2flt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ macro_rules! from_str_float_impl {
/// # Return value
///
/// `Err(ParseFloatError)` if the string did not represent a valid
/// number. Otherwise, `Ok(n)` where `n` is the floating-point
/// number represented by `src`.
/// number. Otherwise, `Ok(n)` where `n` is the closest
/// representable floating-point number to the number represented
/// by `src` (following the same rules for rounding as for the
/// results of primitive operations).
#[inline]
fn from_str(src: &str) -> Result<Self, ParseFloatError> {
dec2flt(src)
Expand Down

0 comments on commit 16c81fa

Please sign in to comment.