about summary refs log tree commit diff
path: root/src/librustdoc/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/lib.rs')
-rw-r--r--src/librustdoc/lib.rs46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index abc6d526cd9..160994f603a 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -86,7 +86,7 @@ type Output = (clean::Crate, Vec<plugins::PluginJson> );
 
 pub fn main() {
     std::os::set_exit_status(main_args(std::os::args().iter()
-                                                      .map(|x| x.to_strbuf())
+                                                      .map(|x| x.to_string())
                                                       .collect::<Vec<_>>()
                                                       .as_slice()));
 }
@@ -166,7 +166,7 @@ pub fn main_args(args: &[String]) -> int {
     let test_args = matches.opt_strs("test-args");
     let test_args: Vec<String> = test_args.iter()
                                           .flat_map(|s| s.as_slice().words())
-                                          .map(|s| s.to_strbuf())
+                                          .map(|s| s.to_string())
                                           .collect();
 
     let should_test = matches.opt_present("test");
@@ -184,7 +184,7 @@ pub fn main_args(args: &[String]) -> int {
         (true, false) => {
             return test::run(input,
                              cfgs.move_iter()
-                                 .map(|x| x.to_strbuf())
+                                 .map(|x| x.to_string())
                                  .collect(),
                              libs,
                              test_args)
@@ -194,7 +194,7 @@ pub fn main_args(args: &[String]) -> int {
         (false, false) => {}
     }
 
-    if matches.opt_strs("passes").as_slice() == &["list".to_strbuf()] {
+    if matches.opt_strs("passes").as_slice() == &["list".to_string()] {
         println!("Available passes for running rustdoc:");
         for &(name, _, description) in PASSES.iter() {
             println!("{:>20s} - {}", name, description);
@@ -268,7 +268,7 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output {
     let mut passes = matches.opt_strs("passes");
     let mut plugins = matches.opt_strs("plugins")
                              .move_iter()
-                             .map(|x| x.to_strbuf())
+                             .map(|x| x.to_string())
                              .collect::<Vec<_>>();
 
     // First, parse the crate and extract all relevant information.
@@ -282,7 +282,7 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output {
     let (krate, analysis) = std::task::try(proc() {
         let cr = cr;
         core::run_core(libs.move_iter().map(|x| x.clone()).collect(),
-                       cfgs.move_iter().map(|x| x.to_strbuf()).collect(),
+                       cfgs.move_iter().map(|x| x.to_string()).collect(),
                        &cr)
     }).map_err(|boxed_any|format!("{:?}", boxed_any)).unwrap();
     info!("finished with rustc");
@@ -301,13 +301,13 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output {
                     clean::NameValue(ref x, ref value)
                             if "passes" == x.as_slice() => {
                         for pass in value.as_slice().words() {
-                            passes.push(pass.to_strbuf());
+                            passes.push(pass.to_string());
                         }
                     }
                     clean::NameValue(ref x, ref value)
                             if "plugins" == x.as_slice() => {
                         for p in value.as_slice().words() {
-                            plugins.push(p.to_strbuf());
+                            plugins.push(p.to_string());
                         }
                     }
                     _ => {}
@@ -318,13 +318,13 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output {
     }
     if default_passes {
         for name in DEFAULT_PASSES.iter().rev() {
-            passes.unshift(name.to_strbuf());
+            passes.unshift(name.to_string());
         }
     }
 
     // Load all plugins/passes into a PluginManager
     let path = matches.opt_str("plugin-path")
-                      .unwrap_or("/tmp/rustdoc/plugins".to_strbuf());
+                      .unwrap_or("/tmp/rustdoc/plugins".to_string());
     let mut pm = plugins::PluginManager::new(Path::new(path));
     for pass in passes.iter() {
         let plugin = match PASSES.iter()
@@ -359,11 +359,11 @@ fn json_input(input: &str) -> Result<Output, String> {
         }
     };
     match json::from_reader(&mut input) {
-        Err(s) => Err(s.to_str().to_strbuf()),
+        Err(s) => Err(s.to_str().to_string()),
         Ok(json::Object(obj)) => {
             let mut obj = obj;
             // Make sure the schema is what we expect
-            match obj.pop(&"schema".to_strbuf()) {
+            match obj.pop(&"schema".to_string()) {
                 Some(json::String(version)) => {
                     if version.as_slice() != SCHEMA_VERSION {
                         return Err(format_strbuf!(
@@ -371,15 +371,15 @@ fn json_input(input: &str) -> Result<Output, String> {
                                 SCHEMA_VERSION))
                     }
                 }
-                Some(..) => return Err("malformed json".to_strbuf()),
-                None => return Err("expected a schema version".to_strbuf()),
+                Some(..) => return Err("malformed json".to_string()),
+                None => return Err("expected a schema version".to_string()),
             }
-            let krate = match obj.pop(&"crate".to_strbuf()) {
+            let krate = match obj.pop(&"crate".to_string()) {
                 Some(json) => {
                     let mut d = json::Decoder::new(json);
                     Decodable::decode(&mut d).unwrap()
                 }
-                None => return Err("malformed json".to_strbuf()),
+                None => return Err("malformed json".to_string()),
             };
             // FIXME: this should read from the "plugins" field, but currently
             //      Json doesn't implement decodable...
@@ -388,7 +388,7 @@ fn json_input(input: &str) -> Result<Output, String> {
         }
         Ok(..) => {
             Err("malformed json input: expected an object at the \
-                 top".to_strbuf())
+                 top".to_string())
         }
     }
 }
@@ -403,14 +403,14 @@ fn json_output(krate: clean::Crate, res: Vec<plugins::PluginJson> ,
     //   "plugins": { output of plugins ... }
     // }
     let mut json = box collections::TreeMap::new();
-    json.insert("schema".to_strbuf(),
-                json::String(SCHEMA_VERSION.to_strbuf()));
+    json.insert("schema".to_string(),
+                json::String(SCHEMA_VERSION.to_string()));
     let plugins_json = box res.move_iter()
                               .filter_map(|opt| {
                                   match opt {
                                       None => None,
                                       Some((string, json)) => {
-                                          Some((string.to_strbuf(), json))
+                                          Some((string.to_string(), json))
                                       }
                                   }
                               }).collect();
@@ -423,15 +423,15 @@ fn json_output(krate: clean::Crate, res: Vec<plugins::PluginJson> ,
             let mut encoder = json::Encoder::new(&mut w as &mut io::Writer);
             krate.encode(&mut encoder).unwrap();
         }
-        str::from_utf8(w.unwrap().as_slice()).unwrap().to_strbuf()
+        str::from_utf8(w.unwrap().as_slice()).unwrap().to_string()
     };
     let crate_json = match json::from_str(crate_json_str.as_slice()) {
         Ok(j) => j,
         Err(e) => fail!("Rust generated JSON is invalid: {:?}", e)
     };
 
-    json.insert("crate".to_strbuf(), crate_json);
-    json.insert("plugins".to_strbuf(), json::Object(plugins_json));
+    json.insert("crate".to_string(), crate_json);
+    json.insert("plugins".to_string(), json::Object(plugins_json));
 
     let mut file = try!(File::create(&dst));
     try!(json::Object(json).to_writer(&mut file));