Skip to content

Commit

Permalink
Automatic deploy to GitHub Pages: e1dbafd
Browse files Browse the repository at this point in the history
  • Loading branch information
GHA CI committed Dec 31, 2023
1 parent 836ddeb commit cfab68d
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 @@ -2683,7 +2683,7 @@
},
"group": "style",
"level": "warn",
"docs": "\n### What it does\nChecks for usage of `x.get(0)` instead of\n`x.first()`.\n\n### Why is this bad?\nUsing `x.first()` is easier to read and has the same\nresult.\n\n### Example\n```rust\nlet x = vec![2, 3, 5];\nlet first_element = x.get(0);\n```\n\nUse instead:\n```rust\nlet x = vec![2, 3, 5];\nlet first_element = x.first();\n```",
"docs": "\n### What it does\nChecks for usage of `x.get(0)` instead of\n`x.first()` or `x.front()`.\n\n### Why is this bad?\nUsing `x.first()` for `Vec`s and slices or `x.front()`\nfor `VecDeque`s is easier to read and has the same result.\n\n### Example\n```rust\nlet x = vec![2, 3, 5];\nlet first_element = x.get(0);\n```\n\nUse instead:\n```rust\nlet x = vec![2, 3, 5];\nlet first_element = x.first();\n```",
"version": "1.63.0",
"applicability": {
"is_multi_part_suggestion": false,
Expand Down

0 comments on commit cfab68d

Please sign in to comment.