File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -951,7 +951,14 @@ pub trait Read {
951951/// function avoids having to create a variable first and provides more type
952952/// safety since you can only get the buffer out if there were no errors. (If you
953953/// use [`Read::read_to_string`] you have to remember to check whether the read
954- /// succeeded because otherwise your buffer will be empty.)
954+ /// succeeded because otherwise your buffer will be empty or only partially full.)
955+ ///
956+ /// # Errors
957+ ///
958+ /// This function forces you to handle errors because the output (the `String`)
959+ /// is wrapped in a [`Result`]. See [`Read::read_to_string`] for the errors
960+ /// that can occur. If any error occurs, you will get an [`Err`], so you
961+ /// don't have to worry about your buffer being empty or partially full.
955962///
956963/// # Examples
957964///
You can’t perform that action at this time.
0 commit comments