summary refs log tree commit diff
path: root/src/libstd/path.rs
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-06-11 11:49:51 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-06-12 12:21:03 +1000
commit96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3 (patch)
tree02a109c7703430ff9595c631e3ba4621c0374f1c /src/libstd/path.rs
parente06579bc0935ed1dcbddef41bc1b6a8850a2059c (diff)
downloadrust-96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3.tar.gz
rust-96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3.zip
std: convert {vec,str}::to_owned to methods.
Diffstat (limited to 'src/libstd/path.rs')
-rw-r--r--src/libstd/path.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index d62fc8c2cba..c8ffe007b90 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);