Skip to content
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

Explaining the reason why validation is performed in to_str of path.rs #63184

Merged
merged 2 commits into from
Aug 6, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/libstd/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,8 @@ impl Path {
/// Yields a [`&str`] slice if the `Path` is valid unicode.
///
/// This conversion may entail doing a check for UTF-8 validity.
/// Also it it worthwhile noting that validation is performed because Non-UTF-8 strings are
JasonShin marked this conversation as resolved.
Show resolved Hide resolved
/// perfectly valid for some OS.
///
/// [`&str`]: ../primitive.str.html
///
Expand Down