Skip to content

Commit 1d126bc

Browse files
committed
Address PR's comments
1 parent 02547b9 commit 1d126bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/transmute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl LateLintPass for Transmute {
9797
let sugg = if ptr_ty == rty {
9898
arg.as_ty(&to_ty.to_string())
9999
} else {
100-
arg.as_ty(&format!("{} as {}", cx.tcx.mk_ptr(rty), to_ty))
100+
arg.as_ty(&cx.tcx.mk_ptr(rty).to_string()).as_ty(&to_ty.to_string())
101101
};
102102

103103
db.span_suggestion(e.span, "try", sugg.to_string());

0 commit comments

Comments
 (0)