提交 1cbb0750 编写于 作者: A Alex Crichton

rollup merge of #19623: rustyrazorblade/patch-1

Docs said from_utf8 accepts a vector when it actually accepts an array of bytes.
......@@ -76,7 +76,7 @@ fn from_str(s: &str) -> Option<bool> {
Section: Creating a string
*/
/// Converts a vector to a string slice without performing any allocations.
/// Converts a slice of bytes to a string slice without performing any allocations.
///
/// Once the slice has been validated as utf-8, it is transmuted in-place and
/// returned as a '&str' instead of a '&[u8]'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册