diff options
| author | pierwill <pierwill@users.noreply.github.com> | 2022-01-13 16:26:31 -0600 |
|---|---|---|
| committer | pierwill <pierwill@users.noreply.github.com> | 2022-01-13 16:29:39 -0600 |
| commit | 7e055c6837ef536ed6069beac69eaeed2391c9be (patch) | |
| tree | 2ab59fee8624b9eeb32cd1ab395155deb67e0485 /src/librustdoc/html/render | |
| parent | 256721ee519f6ff15dc5c1cfaf3ebf9af75efa4a (diff) | |
| download | rust-7e055c6837ef536ed6069beac69eaeed2391c9be.tar.gz rust-7e055c6837ef536ed6069beac69eaeed2391c9be.zip | |
librustdoc: Address some clippy lints
Also ignore clippy's "collapsible if..." lints.
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 8 | ||||
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index dda74904931..c0659b57a8a 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1190,11 +1190,9 @@ fn render_deref_methods( } } render_assoc_items_inner(w, cx, container_item, did, what, derefs); - } else { - if let Some(prim) = target.primitive_type() { - if let Some(&did) = cache.primitive_locations.get(&prim) { - render_assoc_items_inner(w, cx, container_item, did, what, derefs); - } + } else if let Some(prim) = target.primitive_type() { + if let Some(&did) = cache.primitive_locations.get(&prim) { + render_assoc_items_inner(w, cx, container_item, did, what, derefs); } } } diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 11426cb6571..fcbbab27f6e 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -127,12 +127,12 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer, }; let item_vars = ItemVars { - page: page, + page, static_root_path: page.get_static_root_path(), - typ: typ, + typ, name: item.name.as_ref().unwrap().as_str(), item_type: &item.type_().to_string(), - path_components: path_components, + path_components, stability_since_raw: &stability_since_raw, src_href: src_href.as_deref(), }; |
