Skip to content

Commit ccb30bf

Browse files
committed
Auto merge of #13554 - ageorgou:doc-links, r=xFrednet
Documentation fixes - In [the page describing the lints](https://rust-lang.github.io/rust-clippy/master/index.html), the View Source links are incorrect. This PR removes the extra segment causing them to fail. - Example before: https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/clippy_lints/src/absolute_paths.rs#L13 - Example after: https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/absolute_paths.rs#L13 - I think this was introduced in #13269. - I've only checked a few of the lints with the new template, but from what I can tell the metadata is generated in the same way for all of them. The `id_location` contains the full path of the lint declaration in the repository, which is why `clippy_lints` was repeated in the URL. - Separately, fixing a typo in the explanation of `unnecessary_get_then_check`. changelog: none
2 parents ddda954 + 4863625 commit ccb30bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/methods/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4046,7 +4046,7 @@ declare_clippy_lint! {
40464046
/// Checks the usage of `.get().is_some()` or `.get().is_none()` on std map types.
40474047
///
40484048
/// ### Why is this bad?
4049-
/// It can be done in one call with `.contains()`/`.contains_keys()`.
4049+
/// It can be done in one call with `.contains()`/`.contains_key()`.
40504050
///
40514051
/// ### Example
40524052
/// ```no_run

util/gh-pages/index_template.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ <h2 class="panel-title"> {# #}
186186
{# Jump to source #}
187187
{% if let Some(id_location) = lint.id_location %}
188188
<div class="lint-additional-info-item"> {# #}
189-
<a href="https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/{{id_location}}">View Source</a> {# #}
189+
<a href="https://github.com/rust-lang/rust-clippy/blob/master/{{id_location}}">View Source</a> {# #}
190190
</div>
191191
{% endif %}
192192
</div> {# #}

0 commit comments

Comments
 (0)