]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #40648 - s3rvac:fix-path-docs-typo, r=frewsxcv
authorCorey Farwell <coreyf@rwell.org>
Sun, 19 Mar 2017 14:18:23 +0000 (10:18 -0400)
committerGitHub <noreply@github.com>
Sun, 19 Mar 2017 14:18:23 +0000 (10:18 -0400)
Fix a typo in path.rs docs

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> {