Skip to content

Commit

Permalink
Automatic deploy to GitHub Pages: f83a227
Browse files Browse the repository at this point in the history
  • Loading branch information
GHA CI committed Dec 5, 2024
1 parent 3fd053f commit dea4c33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions master/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14208,7 +14208,7 @@ <h3>Configuration</h3>
</div><div class="lint-additional-info-container"><div class="lint-additional-info-item"><span> Applicability: </span><span class="label label-default label-applicability">MachineApplicable</span><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.Applicability.html#variants">(?)</a></div><div class="lint-additional-info-item"><span>Added in: </span><span class="label label-default label-version">1.48.0</span></div><div class="lint-additional-info-item"><a href="https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+unnecessary_lazy_evaluations">Related Issues</a></div><div class="lint-additional-info-item"><a href="https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/methods/mod.rs#L1844">View Source</a></div></div></div></article><article class="panel panel-default" id="unnecessary_literal_bound"><input id="label-unnecessary_literal_bound" type="checkbox"><label for="label-unnecessary_literal_bound" onclick="highlightIfNeeded('unnecessary_literal_bound')"><header class="panel-heading"><h2 class="panel-title"><div class="panel-title-name" id="lint-unnecessary_literal_bound"><span>unnecessary_literal_bound</span> <a href="#unnecessary_literal_bound" onclick="lintAnchor(event)" class="anchor label label-default">&para;</a> <a href="" class="anchor label label-default" onclick="copyToClipboard(event)">&#128203;</a></div><div class="panel-title-addons"><span class="label label-lint-group label-default label-group-pedantic">pedantic</span> <span class="label label-lint-level label-lint-level-allow">allow</span> <span class="label label-doc-folding"></span></div></h2></header></label><div class="list-group lint-docs"><div class="list-group-item lint-doc-md"><h3>What it does</h3>
<p>Detects functions that are written to return <code>&amp;str</code> that could return <code>&amp;'static str</code> but instead return a <code>&amp;'a str</code>.</p>
<h3>Why is this bad?</h3>
<p>This leaves the caller unable to use the <code>&amp;str</code> as <code>&amp;'static str</code>, causing unneccessary allocations or confusion.
<p>This leaves the caller unable to use the <code>&amp;str</code> as <code>&amp;'static str</code>, causing unnecessary allocations or confusion.
This is also most likely what you meant to write.</p>
<h3>Example</h3>
<pre><code class="language-rust">impl MyType {
Expand Down Expand Up @@ -14288,7 +14288,7 @@ <h3>Example</h3>
<li>One side is clearly larger than the other, like i32::MIN and an i32 variable</li>
</ul>
<h3>Why is this bad?</h3>
<p>In the aformentioned cases it is not necessary to call <code>min()</code> or <code>max()</code>
<p>In the aforementioned cases it is not necessary to call <code>min()</code> or <code>max()</code>
to compare values, it may even cause confusion.</p>
<h3>Example</h3>
<pre><code class="language-rust">let _ = 0.min(7_u32);
Expand Down
14 changes: 7 additions & 7 deletions master/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ const APPLICABILITIES_FILTER_DEFAULT = {
MaybeIncorrect: true,
HasPlaceholders: true,
};
const URL_PARAMS_CORRESPONDANCE = {
const URL_PARAMS_CORRESPONDENCE = {
"groups_filter": "groups",
"levels_filter": "levels",
"applicabilities_filter": "applicabilities",
"version_filter": "versions",
};
const VERSIONS_CORRESPONDANCE = {
const VERSIONS_CORRESPONDENCE = {
"lte": "≤",
"gte": "≥",
"eq": "=",
Expand Down Expand Up @@ -285,7 +285,7 @@ window.filters = {
}
function updateIfNeeded(filterName, obj2) {
const obj1 = filters[filterName];
const name = URL_PARAMS_CORRESPONDANCE[filterName];
const name = URL_PARAMS_CORRESPONDENCE[filterName];
if (!compareObjects(obj1, obj2)) {
urlParams.set(
name,
Expand Down Expand Up @@ -316,9 +316,9 @@ window.filters = {
versions.push(`lte:${filters.version_filter["≤"]}`);
}
if (versions.length !== 0) {
urlParams.set(URL_PARAMS_CORRESPONDANCE["version_filter"], versions.join(","));
urlParams.set(URL_PARAMS_CORRESPONDENCE["version_filter"], versions.join(","));
} else {
urlParams.delete(URL_PARAMS_CORRESPONDANCE["version_filter"]);
urlParams.delete(URL_PARAMS_CORRESPONDENCE["version_filter"]);
}

let params = urlParams.toString();
Expand Down Expand Up @@ -532,7 +532,7 @@ function parseURLFilters() {
const urlParams = new URLSearchParams(window.location.search);

for (const [key, value] of urlParams.entries()) {
for (const [corres_key, corres_value] of Object.entries(URL_PARAMS_CORRESPONDANCE)) {
for (const [corres_key, corres_value] of Object.entries(URL_PARAMS_CORRESPONDENCE)) {
if (corres_value === key) {
if (key !== "versions") {
const settings = new Set(value.split(","));
Expand All @@ -545,7 +545,7 @@ function parseURLFilters() {

for (const [kind, value] of settings) {
const elem = document.querySelector(
`#version-filter input[data-value="${VERSIONS_CORRESPONDANCE[kind]}"]`);
`#version-filter input[data-value="${VERSIONS_CORRESPONDENCE[kind]}"]`);
elem.value = value;
updateVersionFilters(elem, true);
}
Expand Down

0 comments on commit dea4c33

Please sign in to comment.