Skip to content

Commit

Permalink
Automatic deploy to GitHub Pages: 78bdd45
Browse files Browse the repository at this point in the history
  • Loading branch information
GHA CI committed Sep 11, 2024
1 parent beaf6d3 commit 648e772
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion master/lints.json
Original file line number Diff line number Diff line change
Expand Up @@ -6637,7 +6637,7 @@
"id_location": "clippy_lints/src/loops/mod.rs#L210",
"group": "complexity",
"level": "warn",
"docs": "### What it does\nDetects `loop + match` combinations that are easier\nwritten as a `while let` loop.\n\n### Why is this bad?\nThe `while let` loop is usually shorter and more\nreadable.\n\n### Known problems\nSometimes the wrong binding is displayed ([#383](https://github.com/rust-lang/rust-clippy/issues/383)).\n\n### Example\n```rust\nloop {\n let x = match y {\n Some(x) => x,\n None => break,\n };\n // .. do something with x\n}\n// is easier written as\nwhile let Some(x) = y {\n // .. do something with x\n};\n```\n",
"docs": "### What it does\nDetects `loop + match` combinations that are easier\nwritten as a `while let` loop.\n\n### Why is this bad?\nThe `while let` loop is usually shorter and more\nreadable.\n\n### Example\n```rust\nlet y = Some(1);\nloop {\n let x = match y {\n Some(x) => x,\n None => break,\n };\n // ..\n}\n```\nUse instead:\n```rust\nlet y = Some(1);\nwhile let Some(x) = y {\n // ..\n};\n```\n",
"version": "pre 1.29.0",
"applicability": "HasPlaceholders"
},
Expand Down

0 comments on commit 648e772

Please sign in to comment.