Skip to content

Commit 7af77f7

Browse files
committed
don't allow as_slice for now
1 parent 05f78e5 commit 7af77f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn adjusts_to_slice(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
6363
/// that also exists on slices. If this returns true, it means that
6464
/// this expression does not actually require a `Vec` and could just work with an array.
6565
fn is_allowed_vec_method(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
66-
const ALLOWED_METHOD_NAMES: &[&str] = &["len", "as_ptr", "as_slice", "is_empty"];
66+
const ALLOWED_METHOD_NAMES: &[&str] = &["len", "as_ptr", "is_empty"];
6767

6868
if let ExprKind::MethodCall(path, ..) = e.kind {
6969
ALLOWED_METHOD_NAMES.contains(&path.ident.name.as_str())

0 commit comments

Comments
 (0)