about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-27 20:44:58 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-28 08:35:41 -0700
commit42aed6bde2fb05a262e21334656cdf91f51744dd (patch)
tree0b7c43f70001fe714a13f95df7e2807a8fdfb85b /src/libstd/io
parent24b1ce1daf9dbf66d04116d0549a48a7610bc614 (diff)
downloadrust-42aed6bde2fb05a262e21334656cdf91f51744dd.tar.gz
rust-42aed6bde2fb05a262e21334656cdf91f51744dd.zip
std: Remove format_strbuf!()
This was only ever a transitionary macro.
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/fs.rs9
-rw-r--r--src/libstd/io/tempfile.rs8
-rw-r--r--src/libstd/io/test.rs10
3 files changed, 13 insertions, 14 deletions
diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs
index d3e250be9a3..a77c7107f28 100644
--- a/src/libstd/io/fs.rs
+++ b/src/libstd/io/fs.rs
@@ -745,8 +745,7 @@ mod test {
     pub fn tmpdir() -> TempDir {
         use os;
         use rand;
-        let ret = os::tmpdir().join(
-            format_strbuf!("rust-{}", rand::random::<u32>()));
+        let ret = os::tmpdir().join(format!("rust-{}", rand::random::<u32>()));
         check!(io::fs::mkdir(&ret, io::UserRWX));
         TempDir(ret)
     }
@@ -953,7 +952,7 @@ mod test {
         check!(mkdir(dir, io::UserRWX));
         let prefix = "foo";
         for n in range(0,3) {
-            let f = dir.join(format_strbuf!("{}.txt", n));
+            let f = dir.join(format!("{}.txt", n));
             let mut w = check!(File::create(&f));
             let msg_str = format!("{}{}", prefix, n.to_str());
             let msg = msg_str.as_slice().as_bytes();
@@ -1040,7 +1039,7 @@ mod test {
         let tmpdir = tmpdir();
 
         let mut dirpath = tmpdir.path().clone();
-        dirpath.push(format_strbuf!("test-가一ー你好"));
+        dirpath.push(format!("test-가一ー你好"));
         check!(mkdir(&dirpath, io::UserRWX));
         assert!(dirpath.is_dir());
 
@@ -1057,7 +1056,7 @@ mod test {
 
         let tmpdir = tmpdir();
         let unicode = tmpdir.path();
-        let unicode = unicode.join(format_strbuf!("test-각丁ー再见"));
+        let unicode = unicode.join(format!("test-각丁ー再见"));
         check!(mkdir(&unicode, io::UserRWX));
         assert!(unicode.exists());
         assert!(!Path::new("test/unicode-bogus-path-각丁ー再见").exists());
diff --git a/src/libstd/io/tempfile.rs b/src/libstd/io/tempfile.rs
index 806df838c91..5ca7e417af6 100644
--- a/src/libstd/io/tempfile.rs
+++ b/src/libstd/io/tempfile.rs
@@ -43,10 +43,10 @@ impl TempDir {
 
         for _ in range(0u, 1000) {
             let filename =
-                format_strbuf!("rs-{}-{}-{}",
-                               unsafe { libc::getpid() },
-                               unsafe { CNT.fetch_add(1, atomics::SeqCst) },
-                               suffix);
+                format!("rs-{}-{}-{}",
+                        unsafe { libc::getpid() },
+                        unsafe { CNT.fetch_add(1, atomics::SeqCst) },
+                        suffix);
             let p = tmpdir.join(filename);
             match fs::mkdir(&p, io::UserRWX) {
                 Err(..) => {}
diff --git a/src/libstd/io/test.rs b/src/libstd/io/test.rs
index bc52bc9946c..4d3dde46b57 100644
--- a/src/libstd/io/test.rs
+++ b/src/libstd/io/test.rs
@@ -67,14 +67,14 @@ pub fn next_test_unix() -> Path {
     // base port and pid are an attempt to be unique between multiple
     // test-runners of different configurations running on one
     // buildbot, the count is to be unique within this executable.
-    let string = format_strbuf!("rust-test-unix-path-{}-{}-{}",
-                                base_port(),
-                                unsafe {libc::getpid()},
-                                unsafe {COUNT.fetch_add(1, Relaxed)});
+    let string = format!("rust-test-unix-path-{}-{}-{}",
+                         base_port(),
+                         unsafe {libc::getpid()},
+                         unsafe {COUNT.fetch_add(1, Relaxed)});
     if cfg!(unix) {
         os::tmpdir().join(string)
     } else {
-        Path::new(format_strbuf!("{}{}", r"\\.\pipe\", string))
+        Path::new(format!("{}{}", r"\\.\pipe\", string))
     }
 }