diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-14 13:43:05 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-16 10:50:28 +1000 |
| commit | ee25cf8d75671415e74ff3fe1a3c0ba42e35396a (patch) | |
| tree | c7111c209e9b7dde736277b385ea950052e521af /src/libstd/path.rs | |
| parent | 4686ed1a1d6e85d2c17fd67fdf4be597c701d141 (diff) | |
| download | rust-ee25cf8d75671415e74ff3fe1a3c0ba42e35396a.tar.gz rust-ee25cf8d75671415e74ff3fe1a3c0ba42e35396a.zip | |
std: test-fixes, remove warnings, syntax highlighting for code examples.
Diffstat (limited to 'src/libstd/path.rs')
| -rw-r--r-- | src/libstd/path.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 400657d0c25..99a7a461ab2 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -515,7 +515,7 @@ impl GenericPath for PosixPath { fn with_filestem(&self, s: &str) -> PosixPath { match self.filetype() { None => self.with_filename(s), - Some(ref t) => self.with_filename(str::to_owned(s) + *t), + Some(ref t) => self.with_filename(s.to_owned() + *t), } } @@ -657,7 +657,7 @@ impl GenericPath for WindowsPath { (None, None) => { host = None; device = None; - rest = str::to_owned(s); + rest = s.to_owned(); } } @@ -729,7 +729,7 @@ impl GenericPath for WindowsPath { fn with_filestem(&self, s: &str) -> WindowsPath { match self.filetype() { None => self.with_filename(s), - Some(ref t) => self.with_filename(str::to_owned(s) + *t), + Some(ref t) => self.with_filename(s.to_owned() + *t), } } @@ -984,7 +984,7 @@ mod tests { fn test_posix_paths() { fn t(wp: &PosixPath, s: &str) { let ss = wp.to_str(); - let sss = str::to_owned(s); + let sss = s.to_owned(); if (ss != sss) { debug!("got %s", ss); debug!("expected %s", sss); @@ -1042,7 +1042,7 @@ mod tests { fn test_normalize() { fn t(wp: &PosixPath, s: &str) { let ss = wp.to_str(); - let sss = str::to_owned(s); + let sss = s.to_owned(); if (ss != sss) { debug!("got %s", ss); debug!("expected %s", sss); @@ -1105,7 +1105,7 @@ mod tests { fn test_windows_paths() { fn t(wp: &WindowsPath, s: &str) { let ss = wp.to_str(); - let sss = str::to_owned(s); + let sss = s.to_owned(); if (ss != sss) { debug!("got %s", ss); debug!("expected %s", sss); |
