about summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2013-12-23 16:20:52 +0100
committerSimon Sapin <simon.sapin@exyr.org>2014-01-21 15:48:47 -0800
commitbada25e425ae30583ad343e36a034e59c66fcad6 (patch)
tree4e07ddbe72ef54075d401322c8283de064f02b4e /src/librustdoc/html/render.rs
parentaa66b91767ce92c45192ca11718575529d631d21 (diff)
downloadrust-bada25e425ae30583ad343e36a034e59c66fcad6.tar.gz
rust-bada25e425ae30583ad343e36a034e59c66fcad6.zip
[std::vec] Rename .pop_opt() to .pop(), drop the old .pop() behavior
Diffstat (limited to 'src/librustdoc/html/render.rs')
-rw-r--r--src/librustdoc/html/render.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index fee97232fa0..9a9b588fa47 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -635,8 +635,8 @@ impl DocFolder for Cache {
             i => i,
         };
 
-        if pushed { self.stack.pop(); }
-        if parent_pushed { self.parent_stack.pop(); }
+        if pushed { self.stack.pop().unwrap(); }
+        if parent_pushed { self.parent_stack.pop().unwrap(); }
         self.privmod = orig_privmod;
         return ret;
     }
@@ -673,7 +673,7 @@ impl Context {
         self.dst = prev;
         let len = self.root_path.len();
         self.root_path.truncate(len - 3);
-        self.current.pop();
+        self.current.pop().unwrap();
 
         return ret;
     }
@@ -693,11 +693,13 @@ impl Context {
         local_data::set(cache_key, Arc::new(cache));
 
         let mut work = ~[(self, item)];
-        while work.len() > 0 {
-            let (mut cx, item) = work.pop();
-            cx.item(item, |cx, item| {
-                work.push((cx.clone(), item));
-            })
+        loop {
+            match work.pop() {
+                Some((mut cx, item)) => cx.item(item, |cx, item| {
+                    work.push((cx.clone(), item));
+                }),
+                None => break,
+            }
         }
     }