]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/passes/strip_hidden.rs
remove unused return types such as empty Results or Options that would always be...
[rust.git] / src / librustdoc / passes / strip_hidden.rs
index 6b59eb8cf288a8246ad06462d92e1c9e93fc41d2..01e3d0acaa8555689e7caafc59b5a290659ecc94 100644 (file)
@@ -41,7 +41,7 @@ fn fold_item(&mut self, i: Item) -> Option<Item> {
         if i.attrs.lists(sym::doc).has_word(sym::hidden) {
             debug!("strip_hidden: stripping {:?} {:?}", i.type_(), i.name);
             // use a dedicated hidden item for given item type if any
-            match i.kind {
+            match *i.kind {
                 clean::StructFieldItem(..) | clean::ModuleItem(..) => {
                     // We need to recurse into stripped modules to
                     // strip things like impl methods but when doing so
@@ -49,7 +49,7 @@ fn fold_item(&mut self, i: Item) -> Option<Item> {
                     let old = mem::replace(&mut self.update_retained, false);
                     let ret = StripItem(self.fold_item_recur(i)).strip();
                     self.update_retained = old;
-                    return ret;
+                    return Some(ret);
                 }
                 _ => return None,
             }