diff options
| author | Chen Chen <0109chenchen@gmail.com> | 2023-09-17 02:42:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-17 02:42:12 +0800 |
| commit | 3cad6237166dc71e2b75a9e60d5058f2876e1959 (patch) | |
| tree | b0ed1b8564046504d3ac56fdcb97e78f8b34be05 | |
| parent | af2a8478ba3228ede92ff799b17ac2408fc6347f (diff) | |
| download | rust-3cad6237166dc71e2b75a9e60d5058f2876e1959.tar.gz rust-3cad6237166dc71e2b75a9e60d5058f2876e1959.zip | |
更新 cast_lossless.rs
Co-authored-by: Timo <30553356+y21@users.noreply.github.com>
| -rw-r--r-- | clippy_lints/src/casts/cast_lossless.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clippy_lints/src/casts/cast_lossless.rs b/clippy_lints/src/casts/cast_lossless.rs index 2f3ffea6693..c586b572be9 100644 --- a/clippy_lints/src/casts/cast_lossless.rs +++ b/clippy_lints/src/casts/cast_lossless.rs @@ -25,14 +25,7 @@ pub(super) fn check( // The suggestion is to use a function call, so if the original expression // has parens on the outside, they are no longer needed. let mut applicability = Applicability::MachineApplicable; - let opt = snippet_opt( - cx, - if cast_op.span.from_expansion() { - cast_op.span.source_callsite() - } else { - cast_op.span - }, - ); + let opt = snippet_opt(cx, cast_op.span.source_callsite()); let sugg = opt.as_ref().map_or_else( || { applicability = Applicability::HasPlaceholders; |
