absent precision parameter for floating point format string is undocumented
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I am talking about format strings of the form format!"{:.}", 1.234). The corresponding documentation for the precision argument is here. The documentation writes that the format is .N where N is an integer specifying the precision.
The bug is that it is not documented that N can also be absent. Either this should not be accepted by the compiler or it should be documented.
I believe the intention is that an absent N means the same thing as if there was no precision specified at all (no :.). Note that this is not the same as "as much precision as needed".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the precision argument documentation at the linked std::fmt page and compare its stated .N syntax with the accepted :. form. Document what an absent precision value means and distinguish it from unspecified precision; the work is done when the syntax and behavior are clear to readers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100