File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2591,11 +2591,11 @@ declare_clippy_lint! {
2591
2591
declare_clippy_lint ! {
2592
2592
/// ### What it does
2593
2593
/// Checks for usage of `x.get(0)` instead of
2594
- /// `x.first()`.
2594
+ /// `x.first()` or `x.front()` .
2595
2595
///
2596
2596
/// ### Why is this bad?
2597
- /// Using `x.first()` is easier to read and has the same
2598
- /// result.
2597
+ /// Using `x.first()` for `Vec`s and slices or `x.front()`
2598
+ /// for `VecDeque`s is easier to read and has the same result.
2599
2599
///
2600
2600
/// ### Example
2601
2601
/// ```no_run
@@ -2611,7 +2611,7 @@ declare_clippy_lint! {
2611
2611
#[ clippy:: version = "1.63.0" ]
2612
2612
pub GET_FIRST ,
2613
2613
style,
2614
- "Using `x.get(0)` when `x.first()` is simpler"
2614
+ "Using `x.get(0)` when `x.first()` or `x.front()` is simpler"
2615
2615
}
2616
2616
2617
2617
declare_clippy_lint ! {
You can’t perform that action at this time.
0 commit comments