Skip to content

Commit 79b1d9a

Browse files
committed
run cargo fmt
1 parent 3a96d6b commit 79b1d9a

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

clippy_lints/src/ptr.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,7 @@ fn check_fn(cx: &LateContext<'_, '_>, decl: &FnDecl, fn_id: NodeId, opt_body_id:
210210
arg.span,
211211
"writing `&String` instead of `&str` involves a new object where a slice will do.",
212212
|db| {
213-
db.span_suggestion(
214-
arg.span,
215-
"change this to",
216-
"&str".into(),
217-
Applicability::Unspecified,
218-
);
213+
db.span_suggestion(arg.span, "change this to", "&str".into(), Applicability::Unspecified);
219214
for (clonespan, suggestion) in spans {
220215
db.span_suggestion_short(
221216
clonespan,

clippy_lints/src/transmute.rs

+2-12
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Transmute {
260260
arg.as_ty(cx.tcx.mk_ptr(rty_and_mut)).as_ty(to_ty)
261261
};
262262

263-
db.span_suggestion(
264-
e.span,
265-
"try",
266-
sugg.to_string(),
267-
Applicability::Unspecified,
268-
);
263+
db.span_suggestion(e.span, "try", sugg.to_string(), Applicability::Unspecified);
269264
}
270265
},
271266
),
@@ -436,12 +431,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Transmute {
436431
|db| {
437432
if let Some(arg) = sugg::Sugg::hir_opt(cx, &args[0]) {
438433
let sugg = arg.as_ty(cx.tcx.mk_ptr(to_ty));
439-
db.span_suggestion(
440-
e.span,
441-
"try",
442-
sugg.to_string(),
443-
Applicability::Unspecified,
444-
);
434+
db.span_suggestion(e.span, "try", sugg.to_string(), Applicability::Unspecified);
445435
}
446436
},
447437
),

0 commit comments

Comments
 (0)