Extra spaces in the format_into documentation
Open
@im-lunex is already working on this.
Since Aug 21, 2026.
A-docs
E-easy
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location (URL)
https://doc.rust-lang.org/stable/core/primitive.usize.html#method.format_into
Summary
use core::fmt::NumBuffer;
let n = 0usize;
let mut buf = NumBuffer::new();
assert_eq!(n.format_into(&mut buf), "0");
let n1 = 32usize;
assert_eq!(n1.format_into(&mut buf), "32");
let n2 = usize :: MAX; // Extra spaces
assert_eq!(n2.format_into(&mut buf), usize :: MAX.to_string()); // Extra spaces
Possible patch:
-#[doc = concat!("let n2 = ", stringify!($Signed::MAX), ";")]
-#[doc = concat!("assert_eq!(n2.format_into(&mut buf), ", stringify!($Signed::MAX), ".to_string());")]
+#[doc = concat!("let n2 = ", stringify!($Signed), "::MAX;")]
+#[doc = concat!("assert_eq!(n2.format_into(&mut buf), ", stringify!($Signed), "::MAX.to_string());")]
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.
Assessment
This issue has not been assessed yet.