Skip to content

Commit 4bbcf10

Browse files
committed
remove one indentation level
Signed-off-by: xizheyin <[email protected]>
1 parent faa71a8 commit 4bbcf10

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/librustdoc/passes/strip_hidden.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ impl DocFolder for Stripper<'_, '_> {
8989
fn fold_item(&mut self, i: Item) -> Option<Item> {
9090
let has_doc_hidden = i.is_doc_hidden();
9191

92-
if let clean::ImportItem(clean::Import { source, .. }) = &i.kind {
93-
if let Some(source_did) = source.did
92+
if let clean::ImportItem(clean::Import { source, .. }) = &i.kind
93+
&& let Some(source_did) = source.did
9494
&& let Some(import_def_id) = i.def_id().and_then(|def_id| def_id.as_local())
9595
{
9696
let reexports = reexport_chain(self.tcx, import_def_id, source_did);
@@ -102,9 +102,8 @@ impl DocFolder for Stripper<'_, '_> {
102102
.any(|reexport_did| self.tcx.is_doc_hidden(reexport_did))
103103
|| self.tcx.is_doc_hidden(source_did);
104104

105-
if has_hidden_source {
106-
return None;
107-
}
105+
if has_hidden_source {
106+
return None;
108107
}
109108
}
110109

0 commit comments

Comments
 (0)