From 4f958fd42f691906acc065fc6ffeff4928b7f333 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 12 Dec 2021 00:29:34 -0800 Subject: [PATCH] Reword Buffer documentation --- src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6bede9a..d5e230b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -48,7 +48,8 @@ mod udiv128; use core::mem::{self, MaybeUninit}; use core::{ptr, slice, str}; -/// A safe API for formatting integers to text. +/// A correctly sized stack allocation for the formatted integer to be written +/// into. /// /// # Example /// @@ -85,8 +86,8 @@ impl Buffer { Buffer { bytes } } - /// Print an integer into this buffer and return a reference to its string representation - /// within the buffer. + /// Print an integer into this buffer and return a reference to its string + /// representation within the buffer. pub fn format(&mut self, i: I) -> &str { i.write(self) }