Skip to content

Commit 3cad623

Browse files
kiscady21
andauthored
更新 cast_lossless.rs
Co-authored-by: Timo <[email protected]>
1 parent af2a847 commit 3cad623

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

clippy_lints/src/casts/cast_lossless.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ pub(super) fn check(
2525
// The suggestion is to use a function call, so if the original expression
2626
// has parens on the outside, they are no longer needed.
2727
let mut applicability = Applicability::MachineApplicable;
28-
let opt = snippet_opt(
29-
cx,
30-
if cast_op.span.from_expansion() {
31-
cast_op.span.source_callsite()
32-
} else {
33-
cast_op.span
34-
},
35-
);
28+
let opt = snippet_opt(cx, cast_op.span.source_callsite());
3629
let sugg = opt.as_ref().map_or_else(
3730
|| {
3831
applicability = Applicability::HasPlaceholders;

0 commit comments

Comments
 (0)