about summary refs log tree commit diff
path: root/src/libregex
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/libregex
parent24b1ce1daf9dbf66d04116d0549a48a7610bc614 (diff)
downloadrust-42aed6bde2fb05a262e21334656cdf91f51744dd.tar.gz
rust-42aed6bde2fb05a262e21334656cdf91f51744dd.zip
std: Remove format_strbuf!()
This was only ever a transitionary macro.
Diffstat (limited to 'src/libregex')
-rw-r--r--src/libregex/re.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libregex/re.rs b/src/libregex/re.rs
index 5958089a8a4..83c1cb37158 100644
--- a/src/libregex/re.rs
+++ b/src/libregex/re.rs
@@ -425,7 +425,7 @@ impl Regex {
     /// # use regex::Captures; fn main() {
     /// let re = regex!(r"([^,\s]+),\s+(\S+)");
     /// let result = re.replace("Springsteen, Bruce", |caps: &Captures| {
-    ///     format_strbuf!("{} {}", caps.at(2), caps.at(1))
+    ///     format!("{} {}", caps.at(2), caps.at(1))
     /// });
     /// assert_eq!(result.as_slice(), "Bruce Springsteen");
     /// # }
@@ -761,9 +761,8 @@ impl<'t> Captures<'t> {
         let re = Regex::new(r"(^|[^$]|\b)\$(\w+)").unwrap();
         let text = re.replace_all(text, |refs: &Captures| -> String {
             let (pre, name) = (refs.at(1), refs.at(2));
-            format_strbuf!("{}{}",
-                           pre,
-                           match from_str::<uint>(name.as_slice()) {
+            format!("{}{}", pre,
+                    match from_str::<uint>(name.as_slice()) {
                 None => self.name(name).to_string(),
                 Some(i) => self.at(i).to_string(),
             })