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