]> git.lizzy.rs Git - rust.git/commitdiff
Fix a typo in path.rs docs
authorPetr Zemek <s3rvac@gmail.com>
Sun, 19 Mar 2017 06:02:20 +0000 (07:02 +0100)
committerPetr Zemek <s3rvac@gmail.com>
Sun, 19 Mar 2017 06:02:20 +0000 (07:02 +0100)
The name of the variable used in the example is `path`, not `os_str`.

src/libstd/path.rs

index a744407903b1ee9ad09abecf754e3710ca09a716..db446d88900c18a43122b64a59ff68dc73aa9f1b 100644 (file)
@@ -1501,7 +1501,7 @@ pub fn to_str(&self) -> Option<&str> {
     /// assert_eq!(path.to_string_lossy(), "foo.txt");
     /// ```
     ///
-    /// Had `os_str` contained invalid unicode, the `to_string_lossy` call might
+    /// Had `path` contained invalid unicode, the `to_string_lossy` call might
     /// have returned `"fo�.txt"`.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn to_string_lossy(&self) -> Cow<str> {