diff options
| author | Kevin Ballard <kevin@sb.org> | 2013-10-15 20:01:33 -0700 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2013-10-16 10:26:48 -0700 |
| commit | 40b324f0dec364a9fa71f9f8b47b8ab156f6d61e (patch) | |
| tree | 4f2bc03c69e8361aa9b17a0e418ea5f98a880a05 /src/libstd/path/posix.rs | |
| parent | 0c7e8f7a92318d19fd9de96ba70fa36fc41de1e2 (diff) | |
| download | rust-40b324f0dec364a9fa71f9f8b47b8ab156f6d61e.tar.gz rust-40b324f0dec364a9fa71f9f8b47b8ab156f6d61e.zip | |
path2: Remove Path.into_str()
Diffstat (limited to 'src/libstd/path/posix.rs')
| -rw-r--r-- | src/libstd/path/posix.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index a7c89cb6029..5eea65a5b91 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -178,10 +178,6 @@ impl GenericPath for Path { self.repr } - fn into_str(self) -> Option<~str> { - str::from_utf8_owned_opt(self.repr) - } - fn dirname<'a>(&'a self) -> &'a [u8] { match self.sepidx { None if bytes!("..") == self.repr => self.repr.as_slice(), @@ -614,12 +610,9 @@ mod tests { assert_eq!(Path::new(b!("foo/bar")).into_vec(), b!("foo/bar").to_owned()); assert_eq!(Path::new(b!("/foo/../../bar")).into_vec(), b!("/bar").to_owned()); - assert_eq!(Path::new("foo/bar").into_str(), Some(~"foo/bar")); - assert_eq!(Path::new("/foo/../../bar").into_str(), Some(~"/bar")); let p = Path::new(b!("foo/bar", 0x80)); assert_eq!(p.as_str(), None); - assert_eq!(Path::new(b!("foo", 0xff, "/bar")).into_str(), None); } #[test] |
