Skip to content

Commit abdb7ae

Browse files
pitiK3Uflip1995
authored andcommitted
Remove backticks
1 parent 854f2ce commit abdb7ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3885,7 +3885,7 @@ fn lint_from_iter(cx: &LateContext<'_>, expr: &hir::Expr<'_>, args: &[hir::Expr<
38853885
expr.span,
38863886
"use `.collect()` instead of `::from_iter()`",
38873887
"consider using",
3888-
format!("`{}.collect()`", iter_expr),
3888+
format!("{}.collect()", iter_expr),
38893889
Applicability::MaybeIncorrect,
38903890
);
38913891
}

tests/ui/from_iter_instead_of_collect.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ error: use `.collect()` instead of `::from_iter()`
22
--> $DIR/from_iter_instead_of_collect.rs:8:5
33
|
44
LL | Vec::from_iter(iter_expr);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: ``iter_expr.collect()``
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `iter_expr.collect()`
66
|
77
= note: `-D clippy::from-iter-instead-of-collect` implied by `-D warnings`
88

99
error: use `.collect()` instead of `::from_iter()`
1010
--> $DIR/from_iter_instead_of_collect.rs:10:5
1111
|
1212
LL | HashMap::<usize, &i8>::from_iter(vec![5, 5, 5, 5].iter().enumerate());
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: ``vec![5, 5, 5, 5].iter().enumerate().collect()``
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `vec![5, 5, 5, 5].iter().enumerate().collect()`
1414

1515
error: aborting due to 2 previous errors
1616

0 commit comments

Comments
 (0)