Fix a typo in path.rs docs
The name of the variable used in the example is `path`, not `os_str`.
This commit is contained in:
@@ -1501,7 +1501,7 @@ impl Path {
|
|||||||
/// assert_eq!(path.to_string_lossy(), "foo.txt");
|
/// 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<66>.txt"`.
|
/// have returned `"fo<66>.txt"`.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub fn to_string_lossy(&self) -> Cow<str> {
|
pub fn to_string_lossy(&self) -> Cow<str> {
|
||||||
|
|||||||
Reference in New Issue
Block a user