File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -230,10 +230,13 @@ cfg_io_util! {
230230 /// let mut buffer = BytesMut::with_capacity(10);
231231 ///
232232 /// assert!(buffer.is_empty());
233+ /// assert!(buffer.capacity() >= 10);
233234 ///
234- /// // read up to 10 bytes, note that the return value is not needed
235- /// // to access the data that was read as `buffer`'s internal
236- /// // cursor is updated.
235+ /// // note that the return value is not needed to access the data
236+ /// // that was read as `buffer`'s internal cursor is updated.
237+ /// //
238+ /// // this might read more than 10 bytes if the capacity of `buffer`
239+ /// // is larger than 10.
237240 /// f.read_buf(&mut buffer).await?;
238241 ///
239242 /// println!("The bytes: {:?}", &buffer[..]);
You can’t perform that action at this time.
0 commit comments