about summary refs log tree commit diff
path: root/src/libstd/path.rs
diff options
context:
space:
mode:
authorJason Shin <visualbbasic@gmail.com>2019-08-01 12:42:52 +1000
committerJason Shin <visualbbasic@gmail.com>2019-08-01 12:42:52 +1000
commit3b15b1664e2856a2a7cf430676355c82f2aac65b (patch)
tree93fcf6618d8bde766c7e789bab0e363df57b82c1 /src/libstd/path.rs
parent8a58268b5ad9c4a240be349a633069d48991eb0c (diff)
downloadrust-3b15b1664e2856a2a7cf430676355c82f2aac65b.tar.gz
rust-3b15b1664e2856a2a7cf430676355c82f2aac65b.zip
Explaining the reason why validation is performed in to_str of path.rs
Diffstat (limited to 'src/libstd/path.rs')
-rw-r--r--src/libstd/path.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 126bc3754da..21c4968bfbe 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -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
     ///