mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
更新 cast_lossless.rs
Co-authored-by: Timo <30553356+y21@users.noreply.github.com>
This commit is contained in:
parent
af2a8478ba
commit
3cad623716
1 changed files with 1 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue