We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
as_slice
1 parent 05f78e5 commit 7af77f7Copy full SHA for 7af77f7
clippy_lints/src/vec.rs
@@ -63,7 +63,7 @@ fn adjusts_to_slice(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
63
/// that also exists on slices. If this returns true, it means that
64
/// this expression does not actually require a `Vec` and could just work with an array.
65
fn is_allowed_vec_method(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
66
- const ALLOWED_METHOD_NAMES: &[&str] = &["len", "as_ptr", "as_slice", "is_empty"];
+ const ALLOWED_METHOD_NAMES: &[&str] = &["len", "as_ptr", "is_empty"];
67
68
if let ExprKind::MethodCall(path, ..) = e.kind {
69
ALLOWED_METHOD_NAMES.contains(&path.ident.name.as_str())
0 commit comments