Skip to content

Commit

Permalink
Explaining the reason why validation is performed in to_str of path.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonShin committed Aug 1, 2019
1 parent 8a58268 commit 3b15b16
Showing 1 changed file with 2 additions and 0 deletions.
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
/// perfectly valid for some OS.
///
/// [`&str`]: ../primitive.str.html
///
Expand Down

0 comments on commit 3b15b16

Please sign in to comment.