about summary refs log tree commit diff
diff options
context:
space:
mode:
authory21 <30553356+y21@users.noreply.github.com>2023-06-07 08:54:32 +0200
committery21 <30553356+y21@users.noreply.github.com>2023-06-07 08:54:32 +0200
commit7af77f74da28b51207cb35dd7d627109571eb678 (patch)
tree725f79eeb0d239cd51f2d33dd05cf1ba7a2fe540
parent05f78e530a78ad4391dd39bb8e78978913de175e (diff)
downloadrust-7af77f74da28b51207cb35dd7d627109571eb678.tar.gz
rust-7af77f74da28b51207cb35dd7d627109571eb678.zip
don't allow `as_slice` for now
-rw-r--r--clippy_lints/src/vec.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/vec.rs b/clippy_lints/src/vec.rs
index ec21f3bb54f..467805d90ff 100644
--- a/clippy_lints/src/vec.rs
+++ b/clippy_lints/src/vec.rs
@@ -63,7 +63,7 @@ fn adjusts_to_slice(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
 /// that also exists on slices. If this returns true, it means that
 /// this expression does not actually require a `Vec` and could just work with an array.
 fn is_allowed_vec_method(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
-    const ALLOWED_METHOD_NAMES: &[&str] = &["len", "as_ptr", "as_slice", "is_empty"];
+    const ALLOWED_METHOD_NAMES: &[&str] = &["len", "as_ptr", "is_empty"];
 
     if let ExprKind::MethodCall(path, ..) = e.kind {
         ALLOWED_METHOD_NAMES.contains(&path.ident.name.as_str())