From 25c7e8664ed11dfc5d922fbc20d004e3aae0e23e Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 7 Aug 2018 10:03:22 -0700 Subject: [PATCH] Document performance characteristics of Buffer::new --- src/buffer/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/buffer/mod.rs b/src/buffer/mod.rs index 8c999e8..069074c 100644 --- a/src/buffer/mod.rs +++ b/src/buffer/mod.rs @@ -20,6 +20,8 @@ pub struct Buffer { } impl Buffer { + /// This is a cheap operation; you don't need to worry about reusing buffers + /// for efficiency. #[inline] #[cfg_attr(feature = "no-panic", no_panic)] pub fn new() -> Self {