Skip to content

Commit

Permalink
Rollup merge of rust-lang#72452 - Lucretiel:precision-doc, r=dtolnay
Browse files Browse the repository at this point in the history
Clarified the documentation for Formatter::precision

Added a note that `precision` is interpreted as max-width when formatting strings
  • Loading branch information
JohnTitor committed May 28, 2020
2 parents 7caf5fb + 526dbd3 commit a32e584
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,8 @@ impl<'a> Formatter<'a> {
self.width
}

/// Optionally specified precision for numeric types.
/// Optionally specified precision for numeric types. Alternatively, the
/// maximum width for string types.
///
/// # Examples
///
Expand Down

0 comments on commit a32e584

Please sign in to comment.