-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Document the Error types in std::string #30124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -36,7 +36,41 @@ pub struct String { | |||
vec: Vec<u8>, | |||
} | |||
|
|||
/// A possible error value from the `String::from_utf8` function. | |||
/// A possible error value when converting a `String` from a UTF8 byte vector. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/UTF8/UTF-8/
f74c6a8
to
674c39e
Compare
@@ -337,8 +390,8 @@ impl String { | |||
/// | |||
/// ``` | |||
/// // 𝄞music | |||
/// let mut v = &mut [0xD834, 0xDD1E, 0x006d, 0x0075, | |||
/// 0x0073, 0x0069, 0x0063]; | |||
/// let v = &mut [0xD834, 0xDD1E, 0x006d, 0x0075, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in these examples the mut
here can be dropped as well (may have just bee included by accident long ago)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
674c39e
to
8f6b30e
Compare
@bors: r+ 8f6b30ea455d41660a544876069a1fdae9ce8f45 |
⌛ Testing commit 8f6b30e with merge 0cf64b8... |
💔 Test failed - auto-mac-64-nopt-t |
8f6b30e
to
546e8f9
Compare
@bors: r=alexcrichton |
📌 Commit 546e8f9 has been approved by |
Part of #29376