run cargo fmt

This commit is contained in:
Matthias Krüger 2019-01-27 13:34:23 +01:00
parent 3a96d6b603
commit 79b1d9adf0
2 changed files with 3 additions and 18 deletions

View File

@ -210,12 +210,7 @@ fn check_fn(cx: &LateContext<'_, '_>, decl: &FnDecl, fn_id: NodeId, opt_body_id:
arg.span,
"writing `&String` instead of `&str` involves a new object where a slice will do.",
|db| {
db.span_suggestion(
arg.span,
"change this to",
"&str".into(),
Applicability::Unspecified,
);
db.span_suggestion(arg.span, "change this to", "&str".into(), Applicability::Unspecified);
for (clonespan, suggestion) in spans {
db.span_suggestion_short(
clonespan,

View File

@ -260,12 +260,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Transmute {
arg.as_ty(cx.tcx.mk_ptr(rty_and_mut)).as_ty(to_ty)
};
db.span_suggestion(
e.span,
"try",
sugg.to_string(),
Applicability::Unspecified,
);
db.span_suggestion(e.span, "try", sugg.to_string(), Applicability::Unspecified);
}
},
),
@ -436,12 +431,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Transmute {
|db| {
if let Some(arg) = sugg::Sugg::hir_opt(cx, &args[0]) {
let sugg = arg.as_ty(cx.tcx.mk_ptr(to_ty));
db.span_suggestion(
e.span,
"try",
sugg.to_string(),
Applicability::Unspecified,
);
db.span_suggestion(e.span, "try", sugg.to_string(), Applicability::Unspecified);
}
},
),