about summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2014-05-25 03:17:19 -0700
committerRicho Healey <richo@psych0tik.net>2014-05-27 12:59:31 -0700
commit1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f (patch)
tree2a56d5ceda84c1a58796fe0fc4e7cea38a9336f6 /src/librustdoc/html/render.rs
parent4348e23b269739657d934b532ad061bfd6d92309 (diff)
downloadrust-1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f.tar.gz
rust-1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f.zip
std: Rename strbuf operations to string
[breaking-change]
Diffstat (limited to 'src/librustdoc/html/render.rs')
-rw-r--r--src/librustdoc/html/render.rs38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index ecbda89ee61..a23aefe03e8 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -218,8 +218,8 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
         root_path: String::new(),
         sidebar: HashMap::new(),
         layout: layout::Layout {
-            logo: "".to_strbuf(),
-            favicon: "".to_strbuf(),
+            logo: "".to_string(),
+            favicon: "".to_string(),
             krate: krate.name.clone(),
         },
         include_sources: true,
@@ -232,11 +232,11 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
                 match *attr {
                     clean::NameValue(ref x, ref s)
                             if "html_favicon_url" == x.as_slice() => {
-                        cx.layout.favicon = s.to_strbuf();
+                        cx.layout.favicon = s.to_string();
                     }
                     clean::NameValue(ref x, ref s)
                             if "html_logo_url" == x.as_slice() => {
-                        cx.layout.logo = s.to_strbuf();
+                        cx.layout.logo = s.to_string();
                     }
                     clean::Word(ref x)
                             if "html_no_source" == x.as_slice() => {
@@ -307,8 +307,8 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
                         ty: shortty(item),
                         name: item.name.clone().unwrap(),
                         path: fqp.slice_to(fqp.len() - 1).connect("::")
-                                                         .to_strbuf(),
-                        desc: shorter(item.doc_value()).to_strbuf(),
+                                                         .to_string(),
+                        desc: shorter(item.doc_value()).to_string(),
                         parent: Some(did),
                     });
                 },
@@ -338,14 +338,14 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
         let mut w = MemWriter::new();
         try!(write!(&mut w, r#"searchIndex['{}'] = \{"items":["#, krate.name));
 
-        let mut lastpath = "".to_strbuf();
+        let mut lastpath = "".to_string();
         for (i, item) in cache.search_index.iter().enumerate() {
             // Omit the path if it is same to that of the prior item.
             let path;
             if lastpath.as_slice() == item.path.as_slice() {
                 path = "";
             } else {
-                lastpath = item.path.to_strbuf();
+                lastpath = item.path.to_string();
                 path = item.path.as_slice();
             };
 
@@ -420,7 +420,7 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
                             format!("{}['{}']", key, krate).as_slice()) {
                         continue
                     }
-                    ret.push(line.to_strbuf());
+                    ret.push(line.to_string());
                 }
             }
             return Ok(ret);
@@ -504,14 +504,14 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
             cx: &mut cx,
         };
         // skip all invalid spans
-        folder.seen.insert("".to_strbuf());
+        folder.seen.insert("".to_string());
         krate = folder.fold_crate(krate);
     }
 
     for &(n, ref e) in krate.externs.iter() {
         cache.extern_locations.insert(n, extern_location(e, &cx.dst));
         let did = ast::DefId { krate: n, node: ast::CRATE_NODE_ID };
-        cache.paths.insert(did, (vec![e.name.to_strbuf()], item_type::Module));
+        cache.paths.insert(did, (vec![e.name.to_string()], item_type::Module));
     }
 
     // And finally render the whole crate's documentation
@@ -570,7 +570,7 @@ fn extern_location(e: &clean::ExternalCrate, dst: &Path) -> ExternalLocation {
                         clean::NameValue(ref x, ref s)
                                 if "html_root_url" == x.as_slice() => {
                             if s.as_slice().ends_with("/") {
-                                return Remote(s.to_strbuf());
+                                return Remote(s.to_string());
                             }
                             return Remote(format_strbuf!("{}/", s));
                         }
@@ -766,9 +766,9 @@ impl DocFolder for Cache {
                     (parent, Some(path)) if !self.privmod => {
                         self.search_index.push(IndexItem {
                             ty: shortty(&item),
-                            name: s.to_strbuf(),
-                            path: path.connect("::").to_strbuf(),
-                            desc: shorter(item.doc_value()).to_strbuf(),
+                            name: s.to_string(),
+                            path: path.connect("::").to_string(),
+                            desc: shorter(item.doc_value()).to_string(),
                             parent: parent,
                         });
                     }
@@ -789,7 +789,7 @@ impl DocFolder for Cache {
         let pushed = if item.name.is_some() {
             let n = item.name.get_ref();
             if n.len() > 0 {
-                self.stack.push(n.to_strbuf());
+                self.stack.push(n.to_string());
                 true
             } else { false }
         } else { false };
@@ -1001,7 +1001,7 @@ impl Context {
             // modules are special because they add a namespace. We also need to
             // recurse into the items of the module as well.
             clean::ModuleItem(..) => {
-                let name = item.name.get_ref().to_strbuf();
+                let name = item.name.get_ref().to_string();
                 let mut item = Some(item);
                 self.recurse(name, |this| {
                     let item = item.take_unwrap();
@@ -1908,9 +1908,9 @@ fn build_sidebar(m: &clean::Module) -> HashMap<String, Vec<String>> {
         let short = shortty(item).to_static_str();
         let myname = match item.name {
             None => continue,
-            Some(ref s) => s.to_strbuf(),
+            Some(ref s) => s.to_string(),
         };
-        let v = map.find_or_insert_with(short.to_strbuf(), |_| Vec::new());
+        let v = map.find_or_insert_with(short.to_string(), |_| Vec::new());
         v.push(myname);
     }