diff options
| author | GnomedDev <david2005thomas@gmail.com> | 2024-09-18 21:42:38 +0100 |
|---|---|---|
| committer | GnomedDev <david2005thomas@gmail.com> | 2024-09-19 13:13:40 +0100 |
| commit | 545967955a52e2a2790def258a9c8a57dea3d379 (patch) | |
| tree | 4688263fbf6f73465b12861b4cd5dee4dbae4e56 /clippy_lints | |
| parent | f66915e8f82fd273ee9601c17b3eb2470774801a (diff) | |
[Clippy] Swap `VecArgs::hir` to use diagnostic items instead of paths
Diffstat (limited to 'clippy_lints')
| -rw-r--r-- | clippy_lints/src/slow_vector_initialization.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/slow_vector_initialization.rs b/clippy_lints/src/slow_vector_initialization.rs index b0e25c02265..6c0b0e11c9e 100644 --- a/clippy_lints/src/slow_vector_initialization.rs +++ b/clippy_lints/src/slow_vector_initialization.rs @@ -153,7 +153,7 @@ impl SlowVectorInit { && is_expr_path_def_path(cx, func, &paths::VEC_WITH_CAPACITY) { Some(InitializedSize::Initialized(len_expr)) - } else if matches!(expr.kind, ExprKind::Call(func, _) if is_expr_path_def_path(cx, func, &paths::VEC_NEW)) { + } else if matches!(expr.kind, ExprKind::Call(func, _) if is_path_diagnostic_item(cx, func, sym::vec_new)) { Some(InitializedSize::Uninitialized) } else { None |
