-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add links to std::char::REPLACEMENT_CHARACTER from docs. #53273
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1175,9 +1175,9 @@ impl CStr { | |
/// If the contents of the `CStr` are valid UTF-8 data, this | ||
/// function will return a [`Cow`]`::`[`Borrowed`]`(`[`&str`]`)` | ||
/// with the the corresponding [`&str`] slice. Otherwise, it will | ||
/// replace any invalid UTF-8 sequences with `U+FFFD REPLACEMENT | ||
/// CHARACTER` and return a [`Cow`]`::`[`Owned`]`(`[`String`]`)` | ||
/// with the result. | ||
/// replace any invalid UTF-8 sequences with | ||
/// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD] and return a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like we're a bit inconsistent between " There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's your opinion? I don't feel strongly There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really feel strongly either. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made consistent in the latest force push |
||
/// [`Cow`]`::`[`Owned`]`(`[`String`]`)` with the result. | ||
/// | ||
/// > **Note**: This method is currently implemented to check for validity | ||
/// > after a constant-time cast, but it is planned to alter its definition | ||
|
@@ -1189,6 +1189,7 @@ impl CStr { | |
/// [`Owned`]: ../borrow/enum.Cow.html#variant.Owned | ||
/// [`str`]: ../primitive.str.html | ||
/// [`String`]: ../string/struct.String.html | ||
/// [U+FFFD]: ../char/constant.REPLACEMENT_CHARACTER.html | ||
/// | ||
/// # Examples | ||
/// | ||
|
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.
was this missed in the push to
U+FFFD REPLACEMENT CHARACTER
everywhere (the above comment)?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.
Not missed, I intentionally didn't change this instance. Not sure I see the value in making all of these cases exactly identical