Skip to content

Commit

Permalink
Run fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Oct 18, 2021
1 parent 5c3b380 commit 7ffba67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/cargo/core/compiler/future_incompat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ fn render_report(per_package_reports: &[FutureIncompatReportPackage]) -> BTreeMa
);
let rendered = report.entry(package_spec).or_default();
rendered.push_str(&format!(
"The package `{}` currently triggers the following future incompatibility lints:\n",
"The package `{}` currently triggers the following future incompatibility lints:\n",
per_package.package_id
));
for item in &per_package.items {
Expand Down Expand Up @@ -359,7 +359,6 @@ pub fn save_and_display_report(
};
let report_id = current_reports.next_id;


// Get a list of unique and sorted package name/versions.
let package_ids: BTreeSet<_> = per_package_future_incompat_reports
.iter()
Expand Down Expand Up @@ -409,10 +408,10 @@ You may want to consider updating them to a newer version to see if the issue ha
)
})
.collect::<Vec<_>>()
.join("\n");
.join("\n");

let suggestion_message = format!(
"
"
To solve this problem, you can try the following approaches:
{update_message}
Expand All @@ -427,11 +426,10 @@ section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
",
upstream_info = upstream_info,
update_message = update_message,
upstream_info = upstream_info,
update_message = update_message,
);


current_reports.save_report(
bcx.ws,
suggestion_message.clone(),
Expand Down
5 changes: 4 additions & 1 deletion src/cargo/core/compiler/job_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,10 @@ impl<'cfg> DrainState<'cfg> {
if !cx.bcx.build_config.build_plan {
// It doesn't really matter if this fails.
drop(cx.bcx.config.shell().status("Finished", message));
future_incompat::save_and_display_report(cx.bcx, &self.per_package_future_incompat_reports);
future_incompat::save_and_display_report(
cx.bcx,
&self.per_package_future_incompat_reports,
);
}

None
Expand Down

0 comments on commit 7ffba67

Please sign in to comment.