Skip to content

Commit a0b0291

Browse files
committed
remove the args.len() check after all
as advised on Zulip
1 parent 476e3b1 commit a0b0291

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

clippy_lints/src/needless_path_new.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ fn check_arguments<'tcx>(
106106
for (argument, parameter) in iter::zip(arguments, parameters) {
107107
if let ExprKind::Call(func, args) = argument.kind
108108
&& is_path_new(func)
109-
// just to be extra sure that we have a correctly formed `Path::new(x)` call
110-
&& args.len() == 1
111109
&& implements_asref_path(cx.typeck_results().expr_ty(&args[0]))
112110
&& implements_asref_path(*parameter)
113111
{

0 commit comments

Comments
 (0)